PHP and JavaScript on a form validation task

From: Date: Fri, 27 Sep 2002 20:19:17 +0000
Subject: PHP and JavaScript on a form validation task
Groups: php.general 
Request: Send a blank email to php-general+get-117888@lists.php.net to get a copy of this message
Hi every1 I'm buidin' up a form that should perform a couple of checks before submit. I used javascript but as the form has got option fields also and some field changes upon the checkbox chosen the script has to know when I'm just changing the option or when I'm tryin' 2 send the form... (in order to change the option or eventually perform the check). Can I do that on the same page? ..I mean can I pass a variable through javascript 2 php? The problem is that if I call the submit button "ready2be_checked" and I use an onclick(validate_the_form) handle, javascript works fine but it misses the variable "ready2be_checked" so the "isset" statement for ex. if(isset($ready2be_checked)){ ....} doesn't work! Using onsubmit instead, javascript performs the check and sends the form anyway cause the isset check finds the variable $ready2be_checked !! ? ? ? ? ? ? ? Sorry if I posted it twice
Thanx in advance                                                                  Ricky


« previous php.general (#117888) next »