A
abarberis
I am writing an asp.net application which is using image buttons for
the interface. I have some buttons that have a enabled and disabled
state. I have written javascript code to change the image on the button
when it is disabled. Below is a snippet:
document.all.btnSignIn.src="Images/sign_in_disabled.gif";
This code correctly changes the image on the button. The problem is
that sometimes if you push the button, it will turn white almost as if
it is waiting to download the image. The page moves too quickly for it
to ever show the disabled version. However, you still see the button
"disappear" for a second before the new page loads.
I have tried to place a hidden version of the disabled image on the
site thinking it might force a download and cache it locally.
Anyone have an idea on how I can make the image switch instantly?
Thanks
Alex
the interface. I have some buttons that have a enabled and disabled
state. I have written javascript code to change the image on the button
when it is disabled. Below is a snippet:
document.all.btnSignIn.src="Images/sign_in_disabled.gif";
This code correctly changes the image on the button. The problem is
that sometimes if you push the button, it will turn white almost as if
it is waiting to download the image. The page moves too quickly for it
to ever show the disabled version. However, you still see the button
"disappear" for a second before the new page loads.
I have tried to place a hidden version of the disabled image on the
site thinking it might force a download and cache it locally.
Anyone have an idea on how I can make the image switch instantly?
Thanks
Alex