|
Posted by dshan on 06/19/06 23:37
Hi all,
I can't find an answer to my quesiton anywhere.
Given a drop-down list with USA states and other text fields I pass
this information for further processing via PHP. If any of the required
fields is empty, the PHP script would return an error and reload the
form page asking to fill out those fields. All entered information is
saved... except for the drop-down list selection. I tried to write a
Javascript function which is echoed by PHP, but interpolation of PHP
variables in the Javascript section gives a syntax error message in
Javascript.
The PHP script returns, e.g., an "AL" string for Alabama. Of course, I
don't want to write PHP code for each option to make it selected.
Would appreciate any reply to my question.
Thanks!
Dshan
[Back to original message]
|