Prior to submittal the PHP variable $maxa has no value. PHP is a server side language, not a client side language.
If you want to use the value of a form in javascript use the javascript objects to access the value of the field. Jason -----Original Message----- From: ZILBER,LEONID (HP-NewJersey,ex1) [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 02, 2002 10:14 AM To: '[EMAIL PROTECTED]' Subject: [PHP] passing PhP parameter to JavaScript function Hi guys, >From PhP, I want to call JavaScript and pass argument to it For some reason when I do the following: onClick=\"return lastCheck($maxa);\ and printout maxa in JavaScript, it says maxa is undefined.... maxa is defined in PhP form section. User enters value into a form which name is maxa. Prior to submittal, I'd like to do smth with the value. Any ideas why? Thanks a lot! ----------- Leon Zilber HP Internet Operation R&D Lab phone: 973.443.78.82 email: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php