faqts : Computers : Programming : Languages : PHP

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

22 of 58 people (38%) answered Yes
Recently 3 of 10 people (30%) answered Yes

Entry

When i press the submit button,the selected name in the list should be displayed in the new popup window for further processing.How to do this?. pl

Feb 18th, 2008 19:31
dman, Mike Boucher, Naveen Ghanathe, http://www.ttnr.org


use a conditional statement to insert "SELECTED"
<SELECT Name="MySelect">
<OPTION value="1" <? if ($MySelect = "1") { print("SELECTED"); }?>>Name1
<OPTION value="2" <? if ($MySelect = "2") { print("SELECTED"); }?>>Name2
<OPTION value="3" <? if ($MySelect = "3") { print("SELECTED"); }?>>Name3
<OPTION value="4" <? if ($MySelect = "4") { print("SELECTED"); }?>>Name4
<OPTION value="5" <? if ($MySelect = "5") { print("SELECTED"); }?>>Name5
</SELECT>
i think you would have to use javascript to accomplish this.