[PHP] using javascript within php
I want to set focus on a text area with javascript if the entry by the user is not what I want. This is what i have so far. ?php if (isset($submitted){ if(empty($name)) { $fname_error = *Please Enter your firstname or initial; //the code to set focus to the textbox should go here } } ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] using javascript within php
Ross Hulford wrote: snip PHP == Server Side HTML/JavaScript == Client Side -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] using javascript within php
[snip] I want to set focus on a text area with javascript if the entry by the user is not what I want. if (isset($submitted){ if(empty($name)) { $fname_error = *Please Enter your firstname or initial; //the code to set focus to the textbox should go here } [/snip] if(empty($name)) { $fname_error = *Please Enter your firstname or initial; //the code to set focus to the textbox should go here echo window.document.YOURFORMNAME.name.focus();; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php