How to hyperlink from onclick event in VBScript

Hi,
I am using VBScript for client side programming. Let me explain the problem. I have to connect to a page depending on the reply to a msgbox displayed by VBScript. i.e the msgbox displays yes or no. How to connect to a page if the user clicks yes ?

Thanks in advance.

Comments

  • : Hi,
    : I am using VBScript for client side programming. Let me explain the problem. I have to connect to a page depending on the reply to a msgbox displayed by VBScript. i.e the msgbox displays yes or no. How to connect to a page if the user clicks yes ?
    :
    : Thanks in advance.
    :
    [code]

    If Msgbox("Are you sure?", vbYesNo + vbExclamation) = vbNo Then
    Msgbox("You Clicked No")
    Else
    document.location.href="http://www.google.com"
    End If


    [/code]
  • : : Hi,
    : : I am using VBScript for client side programming. Let me explain the problem. I have to connect to a page depending on the reply to a msgbox displayed by VBScript. i.e the msgbox displays yes or no. How to connect to a page if the user clicks yes ?
    : :
    : : Thanks in advance.
    : :
    : [code]
    :
    : If Msgbox("Are you sure?", vbYesNo + vbExclamation) = vbNo Then
    : Msgbox("You Clicked No")
    : Else
    : document.location.href="http://www.google.com"
    : End If
    :
    :
    : [/code]
    :

    Thanks Flakes, It is working
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories