Skip to main content
gamedev.net
🔒 Locked

[web] Setting SELECT default choice

Started by Tac-Tics 3 replies 750+ views
Original Post
Tac-Tics
Tac-Tics
If I have a script wih a SELECT-style dropdown menu and the user enters, let's say, an invalid e-mail address, and hits submit, I want to return back to the script with each field displaying what the user had entered previously. I can do this for text forms easily with value="", but how do I do this with a SELECT/OPTION combo?
Tac-Tics
Tac-Tics
Thanks
tstrimp
tstrimp
Quote:
Original post by Tesseract
Newer browsers will require you to set the default selected tag as follows:

<select><option selected="selected">stuff</option></select>


Not newer browsers, newer doctypes. Namely xhtml.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.