AW: how to disable a html:option tag?
Hi, Does nobody know an answer or is it just too trivial?! Hm. The HTML Tag Library says, that I can disable an option by setting disabled to true. However it does not work, the option can still be selected. I am wondering is this a bug or did I miss something? I hope someone can give me a hint. Thank you. Dirk -Ursprüngliche Nachricht- Von: Dirk Manske (Service Respond) [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 16. Januar 2004 18:04 An: [EMAIL PROTECTED] Betreff: how to disable a html:option tag? Vertraulichkeit: Persönlich Hi, I have in a form a html:select tag and inside some html:option tags. I want to disable some options and declared it like this html:select ... html:option value=1 disabled=trueoptionText/html:option /html:select But this seems not to work because this option is still selectable. How to solve it? thx, Dirk - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: how to disable a html:option tag?
You can disable the select tag as a whole, but I've never heard of disabling an option tag. You might just want to not list them. -Original Message- From: Dirk Manske [mailto:[EMAIL PROTECTED] Sent: Saturday, January 17, 2004 5:21 PM To: 'Struts Users Mailing List' Subject: AW: how to disable a html:option tag? Sensitivity: Personal Hi, Does nobody know an answer or is it just too trivial?! Hm. The HTML Tag Library says, that I can disable an option by setting disabled to true. However it does not work, the option can still be selected. I am wondering is this a bug or did I miss something? I hope someone can give me a hint. Thank you. Dirk -Ursprüngliche Nachricht- Von: Dirk Manske (Service Respond) [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 16. Januar 2004 18:04 An: [EMAIL PROTECTED] Betreff: how to disable a html:option tag? Vertraulichkeit: Persönlich Hi, I have in a form a html:select tag and inside some html:option tags. I want to disable some options and declared it like this html:select ... html:option value=1 disabled=trueoptionText/html:option /html:select But this seems not to work because this option is still selectable. How to solve it? thx, Dirk - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: how to disable a html:option tag?
I found this solution searching in google: (http://www.experts-exchange.com/Web/Web_Languages/HTML/Q_20756860.html) [copy of that solution...] html form select onChange=if(this.options[this.selectedIndex].state=='disabled') this.selectedIndex=0 option value=1 state=enabledone/option option value=2 state=enabledtwo/option option value=3 state=disabled style=background-color:silverthree/option option value=4 state=disabled style=background-color:silverfour/option /select input type=submit /form /html When you select disabled option it defaults to first one. Buy the way, you shouldn't show disabled options in the select, that would be a nicer solution, rather than previous one. Cheers. Guillermo -Original Message- From: Hookom, Jacob [mailto:[EMAIL PROTECTED] Sent: Sábado, 17 de Enero de 2004 09:12 p.m. To: Struts Users Mailing List Subject: RE: how to disable a html:option tag? Sensitivity: Personal You can disable the select tag as a whole, but I've never heard of disabling an option tag. You might just want to not list them. -Original Message- From: Dirk Manske [mailto:[EMAIL PROTECTED] Sent: Saturday, January 17, 2004 5:21 PM To: 'Struts Users Mailing List' Subject: AW: how to disable a html:option tag? Sensitivity: Personal Hi, Does nobody know an answer or is it just too trivial?! Hm. The HTML Tag Library says, that I can disable an option by setting disabled to true. However it does not work, the option can still be selected. I am wondering is this a bug or did I miss something? I hope someone can give me a hint. Thank you. Dirk -Ursprüngliche Nachricht- Von: Dirk Manske (Service Respond) [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 16. Januar 2004 18:04 An: [EMAIL PROTECTED] Betreff: how to disable a html:option tag? Vertraulichkeit: Persönlich Hi, I have in a form a html:select tag and inside some html:option tags. I want to disable some options and declared it like this html:select ... html:option value=1 disabled=trueoptionText/html:option /html:select But this seems not to work because this option is still selectable. How to solve it? thx, Dirk - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to disable a html:option tag?
It could be that the the tag just renders an option value=somevalue disabled=truesometext/option html tag. If that is the case then the HTML browser would need to support the disable attribute. I wrote a quick test for IE and Mozilla: html body form select name=x option value=11/option option value=2 disabled=true2/option option value=33/option /select /form /body /html IE V6.0 didn't support the disable attribute. Mozilla Firebird V0.7 does. Hookom, Jacob wrote: You can disable the select tag as a whole, but I've never heard of disabling an option tag. You might just want to not list them. -Original Message- From: Dirk Manske [mailto:[EMAIL PROTECTED] Sent: Saturday, January 17, 2004 5:21 PM To: 'Struts Users Mailing List' Subject: AW: how to disable a html:option tag? Sensitivity: Personal Hi, Does nobody know an answer or is it just too trivial?! Hm. The HTML Tag Library says, that I can disable an option by setting disabled to true. However it does not work, the option can still be selected. I am wondering is this a bug or did I miss something? I hope someone can give me a hint. Thank you. Dirk -Ursprüngliche Nachricht- Von: Dirk Manske (Service Respond) [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 16. Januar 2004 18:04 An: [EMAIL PROTECTED] Betreff: how to disable a html:option tag? Vertraulichkeit: Persönlich Hi, I have in a form a html:select tag and inside some html:option tags. I want to disable some options and declared it like this html:select ... html:option value=1 disabled=trueoptionText/html:option /html:select But this seems not to work because this option is still selectable. How to solve it? thx, Dirk - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Jason Lea - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: how to disable a html:option tag?
Hi, thank you all for your help. The final explanation was brought by Jason. The special disabled attribute only works with mozilla browsers!!! I justt tested it. ie6 indeed does not support the thml:option disable attribute (sh...). Unfortunately I am not allowed to use mozilla... so the javascript example comes in... :) Dirk -Ursprüngliche Nachricht- Von: Jason Lea [mailto:[EMAIL PROTECTED] Gesendet: Sonntag, 18. Januar 2004 01:27 An: Struts Users Mailing List Betreff: Re: how to disable a html:option tag? It could be that the the tag just renders an option value=somevalue disabled=truesometext/option html tag. If that is the case then the HTML browser would need to support the disable attribute. I wrote a quick test for IE and Mozilla: html body form select name=x option value=11/option option value=2 disabled=true2/option option value=33/option /select /form /body /html IE V6.0 didn't support the disable attribute. Mozilla Firebird V0.7 does. Hookom, Jacob wrote: You can disable the select tag as a whole, but I've never heard of disabling an option tag. You might just want to not list them. -Original Message- From: Dirk Manske [mailto:[EMAIL PROTECTED] Sent: Saturday, January 17, 2004 5:21 PM To: 'Struts Users Mailing List' Subject: AW: how to disable a html:option tag? Sensitivity: Personal Hi, Does nobody know an answer or is it just too trivial?! Hm. The HTML Tag Library says, that I can disable an option by setting disabled to true. However it does not work, the option can still be selected. I am wondering is this a bug or did I miss something? I hope someone can give me a hint. Thank you. Dirk -Ursprüngliche Nachricht- Von: Dirk Manske (Service Respond) [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 16. Januar 2004 18:04 An: [EMAIL PROTECTED] Betreff: how to disable a html:option tag? Vertraulichkeit: Persönlich Hi, I have in a form a html:select tag and inside some html:option tags. I want to disable some options and declared it like this html:select ... html:option value=1 disabled=trueoptionText/html:option /html:select But this seems not to work because this option is still selectable. How to solve it? thx, Dirk - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Jason Lea - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
how to disable a html:option tag?
Hi, I have in a form a html:select tag and inside some html:option tags. I want to disable some options and declared it like this html:select ... html:option value=1 disabled=trueoptionText/html:option /html:select But this seems not to work because this option is still selectable. How to solve it? thx, Dirk