share|improve this answer answered Dec 15 '08 at 16:04 Adam Bellaire 60.8k19131152 3 In theory a great idea - but there is NO support for disabled options in IE before Maybe he needs to render the page with selects and use jquery to prevent changes. share|improve this answer answered Aug 23 at 7:54 Prabhagaran 636411 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up But won't work for a
In order to get the value on postbacks and make the control readonly at the same time use the attribute Readonly instead. Sounds like just what we want, but you unknowingly might have caused yourself a small development problem. Demo share|improve this answer edited Feb 1 at 17:36 Álvaro González 81.8k20134204 answered May 2 '14 at 13:03 Vimal 1,6421531 2 This is nice solution for readonly status of SELECT First store value in variable.
How do we do this? However the correct way is to display the value in an input tag using the attribute Readonly. Like this How To Make Dropdown Readonly In Html
you seem to know it. –L4reds Jul 26 '13 at 12:36 add a comment| up vote 1 down vote Select doesn't have attr ReadOnly - instead it can be disabled so Disabled means that in your $_POST or $_GET that element will not show up in your controller. How To Make Select Box Readonly In Html Score a hand of Hearts Is the Caesar cipher really a cipher? Select Readonly Jquery I'm technical referent but I lost the lead for technical decisions What's the meaning of 'Cronenbourg' in the Rick and Morty episode Rick Potion No. 9?
When do we have to call this code: only in document.ready or every time a select is enabled/disabled? That is not an option. Higher up doesn't carry around their security badge and asks others to let them in. How To Make Select Box Readonly In Php It is much more intuitive to disable the list to prevent the user from selecting anything at all. –dana Jan 25 '12 at 23:20 10 I had a similar problem
I've read that you can't set a select as readonly. What does this joke between Dean Martin and Frank Sinatra mean? You have two options here. If the select gets disabled for "readonly", the post back will only contain the value of the hidden input.
Is the Caesar cipher really a cipher? If those answers do not fully address your question, please ask a new question. 2 Firstly, you need to add quotes around the value condition: if (x === "opel").... We recommend upgrading to the latest Safari, Google Chrome, or Firefox.