Imagebutton effects using Javascript...not working in .NET 2.0?

K

K B

Hi,
I've always in past projects used the following in my page load event to
perform rollover effects on my pages. When I switched to the new 2.0
clientscript syntax, it appears to be broken. Thanks for any help. kb

'set button images for Login button
Dim sScript As String = "<script language=javascript>" & _
"if (document.images) {" & _
"Login = new Image;" & _
"LoginOver = new Image;" & _
"LoginDown = new Image;" & _
"LoginActive = new Image;" & _
"Login.src = 'images/login.gif';" & _
"LoginOver.src = 'images/login-over.gif';" & _
"LoginDown.src = 'images/login-down.gif';" & _
"LoginActive.src = 'images/login.gif';" & _
"}" & _
"else {" & _
"Login = '';" & _
"LoginOver = '';" & _
"LoginDown = '';" & _
"LoginActive = '';" & _
"}" & _
"</script>"
ClientScript.RegisterClientScriptBlock(Me.GetType(), "Login",
sScript)
 
G

Guest

Hi Kathy,

See if the script is being emited to the page (IE->view source).

P.S.Forget about IH, I saw your initials and I thought you were someone else
:)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,983
Messages
2,570,187
Members
46,747
Latest member
jojoBizaroo

Latest Threads

Top