RE: using javascript within php

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[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



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux