Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Andrzejek on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

window.open

Status
Not open for further replies.

cjkenworthy

Programmer
Sep 13, 2002
237
GB
I'm using the following code to open a new popup window in IE using Vbscript:

dim NewWindow
NewWindow = window.open ("invoice_popup.asp", "Inactive Numbers", "height=270, width=215, toolbar=no, menubar=no")

I've followed examples but keep getting:

Microsoft VBScript runtime error '800a01a8'

Object required: 'window'

/telecom/invoice.asp, line 36

Any ideas?
 
Your problem is with 'Inactive Numbers'

What should follow the "URL" is:

_blank
_media
_parent
_self.
_search
_self
_top

Ex: -----------------------------------------------------

window.open ("invoice_popup.asp", "_Blank", "height=270, width=215, toolbar=no, menubar=no")

----------------------------------------------------------

syntax:

oNewWindow = window.open( [sURL] [, sName] [, sFeatures] [, bReplace])
"did you just say Minkey?, yes that's what I said."

MrGreed
 
I've tried that:

dim NewWindow
set NewWindow = Window.open("invoice_popup.asp", "_self", "Inactive Numbers", "height=270, width=215, toolbar=no, menubar=no")

and I still get the same error: "Object Required: 'Window'"

Any ideas?
 
Ok, it's nuts, but did you try "window.open" in place of "Window.open" ? Water is not bad as soon as it stays out human body ;-)
 
Another nuts question : between what tags did you put the code you give us : &quot;<%..%>&quot; or &quot;<Script></Script>&quot; because if it's between &quot;<%..%>&quot; tags, it's normal because the window object is a client side object. Water is not bad as soon as it stays out human body ;-)
 
It above all the HTML head etc, at the top of my ASP file:

<%@LANGUAGE=&quot;VBSCRIPT&quot;%>

<% window code here! ...

%>

<HTML>
<HEAD>
...
</HTML>
 
That's what i meant : the window object is only CLIENT SIDE so you CAN'T use it between &quot;<%&quot; and &quot;%>&quot; tags but only between &quot;<SCRIPT>&quot; and &quot;</SCRIPT>&quot; tags. In other way, your server can't open a window on the client. Water is not bad as soon as it stays out human body ;-)
 
what Targol means is the you use this code as follows
Code:
<%
'asp code here
%>
<script language=vbscript>
dim NewWindow
NewWindow = window.open (&quot;invoice_popup.asp&quot;, &quot;Inactive Numbers&quot;, &quot;height=270, width=215, toolbar=no, menubar=no&quot;)
</script>
<!-- html code here -->
________
George, M
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top