valMsg = MsgBox ("Check out wholesale prices. Are you Sure?", 36)
'yes = 6, no = 7
IF valMsg = "6" THEN
top.location.href = "http://evertek.com"
top.location.href = "http://wholesaleauction.com"
> -----Original Message-----
> From: Sander Baaij [mailto:sbaaij@i...]
> Sent: Monday, March 27, 2000 11:22 PM
> To: How To
> Subject: [proasp_howto] msgbox/return problem
> Ok, I have a small programming problem. This one probably has a
> super-simple solution, but I just don't know how.
> The problem is this: I want to click on a link, it opens a
> messagebox with
> 2 options. when clicked on "yes" you proceed, when clicked on "no" the
> action is cancelled.
> I wanted to do this with vbscript (the messagebox or msgbox function is
> only available in vbscript). But there is no "return" command in vbscript
> proper "msgbox" function aside from "alert" (AFAIK).
> Now I'm trying to get around the problem by using "window.location.href"
> to completely bypass returning to the original hyperlink. but for some
> reason this doesn't work.
> Here's some code:
> <script language="vbscript">
> SUB alertlogout()
> Dim valMsg
> valMsg = MsgBox ("If you proceed with this action, your
> login-session will be ended. Are you Sure?", 36)
> 'yes = 6, no = 7
> IF valMsg = 6 THEN
> window.location.href = "Register.asp?Error=WatchOut"
> window.location.href = "Project.asp"
> END IF
> alert (valMsg)
> END SUB
> <a href="Register.asp?Error=WatchOut" onClick=alertlogout()>Re-login</a>
> Thanks in advance,
> Sander Baaij
> Ikhaya Knowledge Integration
> You are currently subscribed to proasp_howto.