Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disabled select list not posting content. 1

Status
Not open for further replies.

1DMF

Programmer
Jan 18, 2005
8,795
GB
Hi,

It's not a biggie this one and maybe the standards define it to work this way but it would be nice if I could do it.

I have a form which I read the URL get var and use JS to auto-select the relative product from the previous page.

All works grand, I then disable the select list(as readonly doesn't work) so the user doesn't then accidently change the option. The form doubles up as a generic form and also I want it to degrade nicely when JS is switched off.

Everything works fine, except when the form is submitted, the content of the select list doesn't seem to get posted to the server.

If a select list has an item selected but the controll is disabled, is this normal behaviour for the data to not be posted?

if disabled will not allow the content to be posted , is there another attribute I could use instead?

regards,

1DMF



"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!
 
unfortunately using a hidden field would break completely if JS was switched off, i'd already concidered that option!

but of course, enable it on submit, it would only get disabled if JS was switched on anyhow, so that would do the job.

Sometimes the answer is so obvious its blinding!

Cheers Chris.

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top