Solved

Strict vbScript redirect method (no asp)

Posted on 2001-07-09
2
467 Views
Last Modified: 2007-11-27
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!
0
Comment
Question by:mcneil
2 Comments
 
LVL 3

Accepted Solution

by:
phuctran earned 50 total points
Comment Utility
is it client-side code?
try to use document.location="abc.com?parm1=1"
0
 
LVL 33

Expert Comment

by:hongjun
Comment Utility
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
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now