linux1880 Posted August 25, 2010 Share Posted August 25, 2010 <select name="hello" id="select_hello"> <option value="hello1">Hello 1</option> <option selected value="hello2">Hello 2</option> <option value="hello3">Hello 3</option> <option value="hello4">Hello 4</option> </select> I have the following code, why is options 'hello2' not being selected when page load ? pls help Link to comment https://forums.phpfreaks.com/topic/211669-option-is-not-being-selected-pls-help/ Share on other sites More sharing options...
PFMaBiSmAd Posted August 25, 2010 Share Posted August 25, 2010 See the correct HTML syntax at this link: http://w3schools.com/tags/att_option_selected.asp Link to comment https://forums.phpfreaks.com/topic/211669-option-is-not-being-selected-pls-help/#findComment-1103454 Share on other sites More sharing options...
chintansshah Posted September 22, 2010 Share Posted September 22, 2010 don't use only selected, use selected="selected" Link to comment https://forums.phpfreaks.com/topic/211669-option-is-not-being-selected-pls-help/#findComment-1114057 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.