Getting Started with Adobe After Effects - Part 6: Motion Blur
A collection of quick technology learning tips from what people around you learn every day

DHTML, beware of ASP.Net and browser's adapted content: checkboxes/radioboxes disabled

Sep 20 2011 11:08PM by Sergejack   

I'm not giving a course on the adapter layer of ASP.Net but as a quick reminder: most of ASP.Net built-in webcontrols' rendering is affected by "browser capabilities". So depending of the browser you're using the (X)HTML markeup renderend may differnt in significant ways which you may not have foretold.

For this case I want to speak about RadioButton and CheckBox when they are rendered being disabled.

RadioButton and CheckBox are usually rendered as a span element surrounding the input element. When they are disabled and rendered for Internet Explorer, the span element might have the following attribute disabled="disabled".

If you were to enable the input element; for instance using jQuery like this: $('INPUT [type="radio"]).prop("disabled", false); , you would not see the checkbox/radioboxe getting enabled. That's because, IE would rely on the span current state (it would still have the property disabled as true).

There are three comon way to get rid of that issue: 1) To not use WebControls when HTMLControls would just do as fine. 2) To completely deactivate the adaption layer/browser detection 3) To think your client code (jQuery, Javascript, ...) with regards of every possible markup.

Read More..   [32134 clicks]

Published under: Microsoft .NET Tips ·  ·  ·  · 


Sergejack
41 · 4% · 1395
2
 
0
Knew
 
 
0
Incorrect
 
0
Interesting
 
0
Forgotten



Submit

1  Comments  

  • I faced this scenario couple of times before.. and choose to disable in JavaScript.

    But i think there was one trick, When a radio button was disabled, its parent element will be a span element and it will also be disabled. By enabling both, i think we can enable radio button control. Did it some time back...

    commented on Sep 20 2011 9:24AM
    Ramireddy
    3 · 40% · 12972

Your Comment


Sign Up or Login to post a comment.

"DHTML, beware of ASP.Net and browser's adapted content: checkboxes/radioboxes disabled " rated 5 out of 5 by 2 readers
DHTML, beware of ASP.Net and browser's adapted content: checkboxes/radioboxes disabled , 5.0 out of 5 based on 2 ratings
    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]