PDA

View Full Version : help with form verification



jimbomac
08-31-2006, 06:42 PM
can some one help me?


plssssssssssss!

i need the code to create aform that confirms the data enter by the user. for example...

name.........
e-mail....
code.....

etc....

and if they do not fill the empty areas...a messages will show saying ....

please enter your"xxxxxxxxx"

before is submited...


need help....

mburt
08-31-2006, 07:34 PM
For checking to see if a checkbox was checked:



function verify() {
var checkbox1 = document.getElementById("thecheckboxesid")
if (!checkbox1.checked) {alert("Please fill in all information.")}
}


For checking to see if an input field's data was entered:



function verify() {
var input1 = document.getElementById("theinputsid")
if (!input1.value) {alert("Please fill in all information.")}
}


Etc. You can edit it from there.

jimbomac
08-31-2006, 09:04 PM
where do i insert this?

jimbomac
08-31-2006, 09:06 PM
i have created a form with a submit button, but now i need to redirect after is sumited to a message such as...thanks for your....info ...! or so.. in the sane window
and a closed button in the same window after


need some help!..