Link to home
Start Free TrialLog in
Avatar of mcneil
mcneil

asked on

Strict vbScript redirect method (no asp)

How can you do a redirect with vbScript without using the response object in ASP?  Here is the code...

<SCRIPT LANGUAGE=vbScript>
sub deleteBtn_OnClick()
     lngControl = MsgBox("Are you sure you want to delete this order?",vbOKCANCEL,"WARNING! YOU ARE ABOUT TO DELETE!")

     If lngControl = vbOk THEN
          response.redirect "orders.asp?action=delete&ID=" & currentID
     End If
End sub
</SCRIPT>

Obviously the redirect doesn't work because it's not in asp, but just vbScript... I realize it's a little wierd to post a non asp question in the asp area, but I figured the people here would know more about vbScript...

Thanks!
ASKER CERTIFIED SOLUTION
Avatar of phuctran
phuctran

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I assume currentID is declared somewhere.

<SCRIPT LANGUAGE=vbScript>
sub deleteBtn_OnClick()
    lngControl = MsgBox("Are you sure you want to delete this order?",vbOKCANCEL,"WARNING! YOU ARE ABOUT TO DELETE!")

    If lngControl = vbOk THEN
         document.location = "orders.asp?action=delete&ID=" & currentID
    End If
End sub
</SCRIPT>


Note the danger of using VBScript at client side scripting language because it works only on IE and not on Netscape.

hongjun