"select" have the "selected" attribute r

A

Anonymous

Guest
In situaiton as yuors I used Javascript. I can not say that my solution is the best, but for me it worked. ALl you have to is to add script in the end of file:
Here is example:
----------------------------------------------------
<select name="sel" id="sel">
<option value=Male>Male</option>
<option value=Female>Female</option>
</select>

<script language="Javascript">
document.all["sel"].value='<?echo $sel?>';
</script>

Where $sel gets value "Male" or "Female" and depending on this value particular optiion will be selected.
---------------------------------------------------------

so you make the same for every of your selects:
document.all["select_id"].value=<?echo $selected_value_taken_from yuor_query ?>
 
Back
Top