Solved

Strict vbScript redirect method (no asp)

Posted on 2001-07-09
2
469 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
ID: 6267191
is it client-side code?
try to use document.location="abc.com?parm1=1"
0
 
LVL 33

Expert Comment

by:hongjun
ID: 6267424
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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
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…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

813 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

11 Experts available now in Live!

Get 1:1 Help Now