
MsgBox Yes/No onClick before a a href
It's tough going trying to cancel a link using VBScript alone. My
workaround is to use Javascript inline to enable the use of the return
keyword for events. Something like this.
<HTML><body><script language="vbs">
Function verify()
verify = CBool(7 - MsgBox("Do you want to go to" &_
" Microsoft's site?",vbYesNo))
End Function
</script>
<a href="http://www.microsoft.com" language="jscript"
onclick="return verify()">MICROSOFT</a>
</body></HTML>
: How can I do an onClick on an anchor tag and do a response.redirect?
:
: Example:
: I am on a page.
: I click the anchor and I get a MsgBox asking if I am sure I want to
Go?
: vbYesNo
: if the answer is vbNo then I want to stay on this page.
: But when returning from the onClick sub the anchor takes over to
leave
: the page.
: I guess I am asking how to stop the anchor tag from taking the
: priority??????Thanks
:
:
: * Sent from RemarQ http://www.remarq.com The Internet's Discussion
Network *
: The fastest and easiest way to search and participate in Usenet -
Free!
: