Print Page | Close Window

window.location : Error window undefined

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=14496
Printed Date: 30 March 2026 at 6:55am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: window.location : Error window undefined
Posted By: riya_singtel
Subject: window.location : Error window undefined
Date Posted: 31 March 2005 at 3:34am
I am using Window.location to go to another page two times in my code written in asp using vbscript. For one it always works fine. For other it gives problems some times displaying an error 'window is undefined'
 
the structure of my code is
<%
Select Case a
Case "1"
Response.Write "<INPUT type=""BUTTON"" VALUE=""Select Dates"" OnClick=""Window.location='links.asp?link=OLM&try=4'"">"
Case "2"
Response.Write "<INPUT type=""BUTTON"" VALUE=""Select Dates"" OnClick=""Window.location='links.asp?link=OOO&try=4'"">"
End Select
%>
It gives the error with the second part. The first part never gave the error
Thanks



Replies:
Posted By: MadDog
Date Posted: 31 March 2005 at 3:44am
Whats the error you are getting?


-------------
http://www.iportalx.net" rel="nofollow">


Posted By: riya_singtel
Date Posted: 31 March 2005 at 4:02am
'Window' is undefined


Posted By: Mart
Date Posted: 31 March 2005 at 4:17am
window needs to be in lower case


Posted By: riya_singtel
Date Posted: 31 March 2005 at 8:15pm
thanks a lot...cudnt imagine that...but would like to know why does the case matter..aren't we coding in VbSCript..and as far as i know case doesnt matter in vbscriptConfused


Posted By: ub3rl337ch3ch
Date Posted: 04 April 2005 at 12:48am
By using response.write, you are affectively writing the following code to the html of the page. In html, when you do an onclick="whatever" you are actually telling it to run "whatever" as if it were in javascript tags.


Posted By: riya_singtel
Date Posted: 04 April 2005 at 6:23am
Great... Thanks.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net