Solved

Strict vbScript redirect method (no asp)

Posted on 2001-07-09
2
472 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Html value of radio 14 52
MS SQL and column defined as time 7 35
JQuery DataTable Functionality 8 49
Passing ASP variables in JQuery 4 50
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 informatio…
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…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

738 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