response.redirect from an OnClick event

Results 1 to 2 of 2

Thread: response.redirect from an OnClick event

  1. #1
    ASP Doofus Guest

    Default response.redirect from an OnClick event

    I&#039;m trying to redirect a user when they click on an image (or a link) but I can&#039;t seem to get the syntax right. It either blows up on me or routes me directly to the redirect page. Here&#039;s what I have so far...<BR><BR>mylink = "../../Compliance/asp/LogonValidate.asp?txtuserid="+UserID+"&txtpassword ="+UserPwd<BR><BR>&#060;img src="../images/compliance.gif" width=131 height=27 border=0 alt="Compliance DataStation" <BR>&#060;% Response.write("onclick="+Response.redirect(mylink )) %&#062; &#062; <BR><BR>Thanks in advance for any help anyone can provide.

  2. #2
    RDM Guest

    Default OnClick is not a server side event

    You should format the redirect in an href tag that surrounds the image tag. &#060;a href=;&#060;img src=stuff.jpg&#062;&#060;/a&#062;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts