Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Other Programming > VBScript
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old August 27th, 2009, 10:57 AM
Friend of Wrox
Join Date: Jun 2003
Posts: 428
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"
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
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
Join Date: Jun 2003
Posts: 428
Thanks: 57
Thanked 2 Times in 2 Posts

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

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 06: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 12:01 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.