I am running a php & java script that when searching for a property, it uses the onchange feature for three fields regarding the location of the property.
for example: Country, Parish, Area
When you choose a country, you then choose a Parish(which correspons to the country) and then an Area (that corresponds to the Parish)
Thing is, I am only using one country and would like the script to automatically show/filter to that country rather than 'Any'. For example I would want the Country field to show United Kingdom as a default.
What i want is to filter to first value(United Kingdom) by default in the dropdown (location1)
Any help would be greatly appreciated
Last edited by PeejAvery; January 11th, 2009 at 07:23 PM.
You could use selectedIndex. It is very simple. The index corresponds to the <option> that you want to be preselected. However, it is not the best solution. You want to use the selected attribute in the <option> tag.