PDA

View Full Version : Selected Value



cameron
09-08-2006, 07:49 AM
I'm making an edit feature in my CMS in which I load values from the database into a <select> dropdown list. I want to know how to specifiy the option which is selected when the page loads instead of having it simply select the first item in the list. Thanks.

Nico
09-08-2006, 08:20 AM
You can specifiy the option which is selected when the page loads by adding the "selected" attribute in the option you want:

<OPTION selected value="1">Option1</OPTION>