PHP Classes

bug with focus_input

Recommend this page to a friend!

      PHP Forms Class with HTML Generator and JavaScript Validation  >  All threads  >  bug with focus_input  >  (Un) Subscribe thread alerts  
Subject:bug with focus_input
Summary:Pb with "test_form.php"
Messages:2
Author:nataz kaupaz
Date:2006-09-22 11:02:00
Update:2006-09-22 17:41:53
 

  1. bug with focus_input   Reply   Report abuse  
Picture of nataz kaupaz nataz kaupaz - 2006-09-22 11:02:00
Hi Manu,
When I modify "test_form.php", replacing

/*
* Make the email field get the input focus when the page is loaded
* if there was no previous validation error.
*/
$focus="email";
}

$form->AddFunction(array(
"Function"=>"PageLoad",
"Type"=>"focus",
"Element"=>$focus
));
}

by


//*
* Make the email field get the input focus when the page is loaded
* if there was no previous validation error.
*/
$focus="credit_card_type";
}

$form->AddFunction(array(
"Function"=>"PageLoad",
"Type"=>"focus",
"Element"=>$focus
));
}

I still have the focus on the email input instead of credit_card_type.

Is there a logical explanation or is it a real bug?

cheers.

  2. Re: bug with focus_input   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2006-09-22 17:41:53 - In reply to message 1 from nataz kaupaz
It works perfectly here. Either you are seeing a cached version of the page or the form was validated and the email field is invalid.