H
Harry
Hello,
I have an ASP.Net web page populated with WebControls, such as
textboxes and checkboxes. On this page I also have a JavaScript that
disables these textboxes under certain events (such as "onLoad" and
"onClick") by calling the javascript method <object>.disabled =
<true/false>. This works visably fine on the webpage, however, when I
do a postback to the server and check the <WebControl>.Enabled
property on an item I disabled via the javascript it does not reflect
its current state. Rather, it reports the Enabled property as whatever
I initilized it to. Now I believe this is because the client is never
communicating the enabled/disabled state change to the server. Is
there a work around for this that doesn't require additional server
side postbacks and validation? The whole purpose of using JavaScript
in the first place was to avoid postbacks on checkbox clicks that
would call server-side code to enable/disable textboxes. Any ideas are
much appreciated.
- Harry
I have an ASP.Net web page populated with WebControls, such as
textboxes and checkboxes. On this page I also have a JavaScript that
disables these textboxes under certain events (such as "onLoad" and
"onClick") by calling the javascript method <object>.disabled =
<true/false>. This works visably fine on the webpage, however, when I
do a postback to the server and check the <WebControl>.Enabled
property on an item I disabled via the javascript it does not reflect
its current state. Rather, it reports the Enabled property as whatever
I initilized it to. Now I believe this is because the client is never
communicating the enabled/disabled state change to the server. Is
there a work around for this that doesn't require additional server
side postbacks and validation? The whole purpose of using JavaScript
in the first place was to avoid postbacks on checkbox clicks that
would call server-side code to enable/disable textboxes. Any ideas are
much appreciated.
- Harry