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

  • Thread starter Thread starter K B
  • Start date Start date
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)
 
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
:)
 
Back
Top