By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,644 Members | 2,105 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,644 IT Pros & Developers. It's quick & easy.

MsgBox and redirect problem

P: 1
I'm trying to have a pop up message box ask the user if they are sure they want to do this procedure and have it redirect to another page if the answer is no.

Here's the code:
Expand|Select|Wrap|Line Numbers
  1. <script language=VBScript>
  2. dim myanswer
  3. myanswer=MsgBox("Are you Sure?",1,"Example")
  4. If myanswer = 1 Then
  5.     Response.Redirect("reset_today1.asp")
  6. Else
  7.     Response.Redirect("../default1.asp")
  8. End If
  9. </script>
It all runs well (the MsgBox pops up) except that it doesn't do the redirect and I get the error: Object required: 'Response'

What am I doing wrong?

Dec 13 '07 #1
Share this Question
Share on Google+
1 Reply

Expert 5K+
P: 8,434
Well, what is the Response object? Do you normally use it? Perhaps you need to add a reference.
Dec 14 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.