Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Other Programming > VBScript
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
VBScript For questions and discussions related to VBScript.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VBScript section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Closed Thread
 
Thread Tools Display Modes
  #1 (permalink)  
Old August 27th, 2009, 10:57 AM
Friend of Wrox
Points: 2,813, Level: 22
Points: 2,813, Level: 22 Points: 2,813, Level: 22 Points: 2,813, Level: 22
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Denver, CO, USA.
Posts: 427
Thanks: 57
Thanked 2 Times in 2 Posts
Default Response.Redirect gets "object required" error

I am having an annoying problem with this simple client side vbscript on a .NET page:

sub ChangedName()
msgbox "Before"
Response.Redirect("http:\\www.google.com")
msgbox "After"
end sub


It displays "Before", but not "After", and returns the error: Object required: Response

The problem is not the URL but the *&^% Response object.

The script couldn't be any simpler so there must be something stupid I've done and keep overlooking. I've wasted over an hour now trying to figure out why it should think Response doesn't exist and it is driving me nuts!!!

Can anybody suggest WTF is wrong?
  #2 (permalink)  
Old August 27th, 2009, 11:47 AM
Friend of Wrox
 
Join Date: Nov 2007
Location: Central Florida, USA.
Posts: 207
Thanks: 2
Thanked 15 Times in 15 Posts
Default Well...

RESPONSE is an asp method... I don't know vbscript that well but i assume it would be similar to javascript

window.location.href = "http:\\www.google.com"

or something to that effect?
__________________
Jason Hall

Follow me on Twitter @jhall2013
  #3 (permalink)  
Old August 27th, 2009, 01:45 PM
Friend of Wrox
Points: 2,813, Level: 22
Points: 2,813, Level: 22 Points: 2,813, Level: 22 Points: 2,813, Level: 22
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Denver, CO, USA.
Posts: 427
Thanks: 57
Thanked 2 Times in 2 Posts
Default

Thank you alliancejhall! Numerous sites insisted RESPONSE.REDIRECT was valid VBS. Glad I finally came someplace where people know what they're talking about.
Closed Thread


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Error in sample code "Professional Codeigniter" langithitam BOOK: Professional CodeIgniter ISBN: 978-0-470-28245-8 5 November 1st, 2009 05:20 AM
Export to Excel Error "HRESULT : 0x800AC472" Michael YoeH ASP.NET 3.5 Professionals 0 July 14th, 2009 03:31 AM
Passing "MyClass" Object between Pages dpkbahuguna ASP.NET 3.5 Basics 2 June 5th, 2009 10:01 AM
Code not going as planned: "icicle" vs "savedinstancestate" joopthecat BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2 3 May 3rd, 2009 03:09 PM
google Response.Write(Request.QueryString("q")) senol01 ASP.NET 2.0 Basics 1 January 2nd, 2009 11:01 AM



All times are GMT -4. The time now is 02:33 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.