J
john
I have two different problems:
1. When the user has clicked on a button that is causing the browser
to post back to the server, it could take a little while for the new
page to show up. So in the mean time, I want to change the cursor to
an hourglass and disable all of the controls on the form using
javascript so the user can't do anything with any of the controls on
the page. But when I disable certain controls (e.g. text boxes, radio
buttons, etc.) then their value/state doesn't get saved after it posts
back.
2. When I disable a link (i.e. one created with a LinkButton control)
using javascript, it gets grayed out, but the user can still use it.
In other words, it looks disabled, but the user can still click on it
and the page goes to the link. On the other hand, if I disable a link
on the server side by setting the control's Enabled property to false,
then it ends up completely disabled like you would expect. I think the
reason that in this case it's competely disabled is that not only does
the html that is generated have disabled="disabled" in the tag, but
there is no href in the tag. If I try to change the href to '' with
javascript, it doesn't do the same thing.
Any ideas?
Thanks in advance.
1. When the user has clicked on a button that is causing the browser
to post back to the server, it could take a little while for the new
page to show up. So in the mean time, I want to change the cursor to
an hourglass and disable all of the controls on the form using
javascript so the user can't do anything with any of the controls on
the page. But when I disable certain controls (e.g. text boxes, radio
buttons, etc.) then their value/state doesn't get saved after it posts
back.
2. When I disable a link (i.e. one created with a LinkButton control)
using javascript, it gets grayed out, but the user can still use it.
In other words, it looks disabled, but the user can still click on it
and the page goes to the link. On the other hand, if I disable a link
on the server side by setting the control's Enabled property to false,
then it ends up completely disabled like you would expect. I think the
reason that in this case it's competely disabled is that not only does
the html that is generated have disabled="disabled" in the tag, but
there is no href in the tag. If I try to change the href to '' with
javascript, it doesn't do the same thing.
Any ideas?
Thanks in advance.