on load populate combo box from php value
Posted on 2008-11-03
here my problem
i have a combobox that populates schools..i want topass the value of this school to a php page that has a combobox init and if the value = a value then it selects that value.
University of Louisville
West Liberty State College
user has picked school 2 from previous page. and this value is in $school_pick as "University of Louisville"
how do i get an onload for the combo box to populate the combo box to reflect that please
thank you for any help and code you may propvide
i thought i could do this but its not working
<body bgcolor="#ffffff" link="#5e2f2f" text="#000000" vlink="#666666" onLoad='document.form.School.selectedIndex = "2";'>
<SELECT name='School' size='1' onChange='reloadCities(this.selectedIndex);' onclick='enableLoft();'>
<OPTION value='Wittenberg University'>Wittenberg University</option>
<OPTION value='University of Louisville'>University of Louisville</option>
<OPTION value='West Liberty State College'>West Liberty State College</option>