Hey, I'm building a website now, I've got a local server setup.
I have "signup.html" which has a list of text fields in a table, and a signup button at the bottom...
The signup button, has type="button" instead of "submit", and onclick I run a javascript function which compares if the password & confirm password are the same, and the e-mail & confirm e-mail are the same, and if they are not, it alerts them and nothing happens... If everything is correct, it changes the type of the button to submit, and it does what it's supposed to do, and we go to my signuser.php page, which creates the fields in my database.
However, if I select a text field like my e-mail text field, and I press Enter... we go straight to signuser.php and I can't figure out why! (or how to stop it)
Each text field has onkeyup="textchanged(ID_OF_TEXTFIELD)", this doesn't do much yet, has some blank IF statements.
The form I have's method is set to post, and action to signuser.php
EDIT: even with the sign up button commented out, it still runs, and also even without the onkeyup event for the text fields
Does anyone know why this is happening?
Kind Regards
I have "signup.html" which has a list of text fields in a table, and a signup button at the bottom...
The signup button, has type="button" instead of "submit", and onclick I run a javascript function which compares if the password & confirm password are the same, and the e-mail & confirm e-mail are the same, and if they are not, it alerts them and nothing happens... If everything is correct, it changes the type of the button to submit, and it does what it's supposed to do, and we go to my signuser.php page, which creates the fields in my database.
However, if I select a text field like my e-mail text field, and I press Enter... we go straight to signuser.php and I can't figure out why! (or how to stop it)
Each text field has onkeyup="textchanged(ID_OF_TEXTFIELD)", this doesn't do much yet, has some blank IF statements.
The form I have's method is set to post, and action to signuser.php
EDIT: even with the sign up button commented out, it still runs, and also even without the onkeyup event for the text fields
Does anyone know why this is happening?
Kind Regards