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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

New Window not opening in IE

Status
Not open for further replies.

bill1one

Programmer
Sep 29, 2004
93
0
0
US
I have been trying everything to make the following code work in IE. It works fine in Firefox. Any suggestions?

This is in the head tags:
Code:
<script language="JavaScript" type="text/javascript">
function newwindow(url) {
 window.open(url,'details', 'width=750,height=700,scrollbars=yes');
}
</script>

This is in the body:
Code:
<a href="javascript:newwindow('image.php?image=215');"><img src='thumbs/215' border='0' width='100' /></a>
 
Maybe you have blocked pop-up windows in IE? The code looks ok, at a glance.

Cheers,
Jeff

[tt]Jeff's Blog [!]@[/!] CodeRambler
[/tt]

Make sure your web page and css validates properly against the doctype you have chosen - before you attempt to debug a problem!

FAQ216-6094
 
I made sure that pop-ups weren't blocked. I did look at the error message generated by IEv6 and it says "Invalid Argument" for the line
Code:
window.open(url,'details', 'width=750,height=700,scrollbars=yes');
I don't understand...I really don't see anything wrong with it. Any help is appreciated.

 
Make sure [tt]'details'[/tt] is literally what you have scripted. That part may not contain whitespace. Your actual argument cannot be something such as [tt]'details[highlight] [/highlight]with[highlight] [/highlight]spaces'[/tt].
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top