View Single Post
Old 08-19-2010, 05:36 PM   PM User | #6
Spudhead
Senior Coder

 
Spudhead's Avatar
 
Join Date: Jun 2002
Location: London, UK
Posts: 1,856
Thanks: 8
Thanked 110 Times in 109 Posts
Spudhead is on a distinguished road
So... the logic goes:

Code:
if no submitted form value for field 
	
	write the select box,
	write the options in it,
	add option to selectbox, using selectbox's label text, and make it selected

else if submitted value

	write the select box,
	write the options in it,
	if one of the options has the same value as the submitted form value
		make that one selected
Is that about right? If so, and especially if you're sumbitting the page to itself, I'd do it all server side. Sorry, that's probably not the answer you needed.
Spudhead is offline   Reply With Quote