Disable enable select option javascript
Welcome to WebmasterWorld Guest from I have the following select menu: I'm wondering if it's possible to write some javascript at the bottom of the page that will do the disabling for me.
HTML option disabled Attribute
Am I not doing this right, or is this not even possible? July 21, posts: June 17, posts: I can pass it a single array and set some basic "select level" options, like class, but I can't pass it "option level" items. Hence wanting to do this outside of the select itself. I know this is a dirty hack and there must be a better way of doing this in ZF, but I'll be dammed if I can find out how.
Shall I take it that this isn't possible do do with javascript? Mar 22, posts: Your other option would be to simply use two separate select dropdowns.
JavaScript is too unreliable, as it can be disabled by the client. Aug 10, posts: Oct 17, posts: June 12, posts: Now, I can but wonder what a disabled optgroup looks like! Become a Pro Member.
Terms of Service and Privacy Policy. All trademarks and copyrights held by respective owners. Member comments are owned by the poster. WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
Forum Index Supporters Forums Tools All SEO Tools All Social Tools All Webmaster Tools All Free Tools Pro Membership Recent Posts Open Posts Resources Library Announcements Hire Register Login Search Search.
This page requires javascript to function properly. It seems disable enable select option javascript your browser does not have Javascript enabled. Message Too Old, No Replies How to disable select options go easy on me! How to specify certain options in a select menu, without effecting all of them Both of them sound like good ideas. Also note that you have two options valued "re" - that could cause some problems.
HTML DOM Select disabled Property
How about changing apple to "ap"? Mar 15, posts: I am not familiar with the zend framework either, but I would be very surprised if value selected dropdown jquery did not have a defined method for handling option groups.
Thanks for all the replies. Yes, that is valid.
From phranque's link above: The following elements support the disabled attribute: BUTTON, INPUT, OPTGROUP, Stock exchange listed companies in chennaiSELECT, and TEXTAREA. I did not think this functionality existed. And I find myself corrected as well: Now I can use optgroup Stock market gujarati news paper don't have to worry about the disabled part.
I was asking about that because I didn't want the group heading fruit, color to be selectable. Become a Pro Member Join The Conversation Register For Free! Firefox 54, Faster, Less Resources Snapchat Now Offers Self-Serve Advertising With Snap Publisher Tool Instagram Clamps Down on Bots and The Companies Running Them Bing Image Search Removal Seems Slow Upgrade to HTTPS - Use Relative vs.
html - How can I disable an
Popular Forum Categories Forum Index WebmasterWorld Supporters Webmaster General WebmasterWorld Community Center General Search Engine Marketing Issues Google SEO News and Discussion Google AdWords Google AdSense Link Development Facebook Marketing Twitter Code, Content, and Presentation Domain Names Affiliates Ecommerce Foo.
Hire an Employee All Employees Programming languages Web Development Consulting Training Recurring Services SEO Services Social Media Services Content Creation Link Building Link Cleanup Viral Content Creation Reputation Management Pay Per Click Management Analytics Analysis Local Marketing Email Marketing Usability Other. Hire A Services Company All Service Companies Internet Marketing Consulting SEO Services Social Media Services Content Creation Link Building Link Cleanup Viral Content Internet Marketing Training Reputation Management Pay Per Click Management Analytics Analysis Local Marketing Web Development Email Marketing Programming Other.
Hire A Programmer All Programmers Assembler Basic C C Plus C Sharp CSS D Erlang Go Hack HTML Java Javascript Perl PHP Python Scala Ruby on Rails Visual Basic XHP.
SEO Tools All SEO Tools Website Crawler SE Comparison Tool On-Page SEO Tool Keyword Suggest Tool Image and Link Analysis Page Comparison. Webmaster Tools All Webmaster Tools HTTP Response Headers Find My IP Whois Domain Look Up Whats My Browser Size Block Image Hot Linking in. More Free Tools All Free Tools Schema Tools PPC Tools Web Design Tools Other Tools Disavow Backlinks Tool In-depth schema code.
Resources Home Report Problem Library Hire Experts.
Settings Login Control Panel Send Message My Profile. WebmasterWorld About Newsletter Archives Signup for our Newsletter.