PDA

View Full Version : window.open not working in IE but fine in Firefox


sheldongold
07-20-2005, 11:22 AM
Hi,

I am having real trouble getting pop up windows to work with IE. I have tried 3 different methods (all from this site) that work perfectly with Firefox but just don't work at all in IE and simply kick up an error pointing to an 'Invalid Argument' at the line with window.open in it. :mad:

You can see it for yourself at www.artuntitled.co.uk but here's the code I'm using:

on the button in the flash file (index.swf):

on (release) {
getURL ("Javascript:popupwindow(1)");
}

in between the <head> tags in the html file (index.html):

<script language="javascript">
function popupwindow(index)
{
if(index==1)
{
site="main.html"
}

window.open(site,"Oliver Twitchett","toolbar=0,location=0,directories=0,status=0,menuba r=0,scrollbars=0,resizeable=0,width=800,height=600")
}
</script>

Any help will be greatly appreciated!

Thanks in advance
Sheldon

sheldongold
07-20-2005, 12:26 PM
Hi,

I am having real trouble getting pop up windows to work with IE. I have tried 3 different methods (all from this site) that work perfectly with Firefox but just don't work at all in IE and simply kick up an error pointing to an 'Invalid Argument' at the line with window.open in it. :mad:

You can see it for yourself at www.artuntitled.co.uk but here's the code I'm using:

on the button in the flash file (index.swf):

on (release) {
getURL ("javascript:popupwindow(1)");
}


in between the <head> tags in the html file (index.html):

<script language="javascript">
function popupwindow(index)
{
if(index==1)
{
site="main.html"
}

window.open(site,"Oliver Twitchett","toolbar=0,location=0,directories=0,status=0,menuba r=0,scrollbars=0,resizeable=0,width=800,height=600 ")
}
</script>

It is not a problem with IE locally as I have tested and had it tested on loads of other computers and versions all with the same result...

Any help will be greatly appreciated!

Thanks in advance
Sheldon

Billystyx
07-20-2005, 12:41 PM
try changing Oliver Twitchett to Oliver_Twitchett

sheldongold
07-20-2005, 12:57 PM
You are my hero!! :)

Thanks fort that, I knew it was going to be a tiny little thing like that, but I'd never have found it.

Yay, I can get on with the rest of my work now...

Sheldon

sheldongold
07-20-2005, 01:02 PM
May thanks go to billystyx, who spotted that the problem was the simple matter of changing Oliver Twitchett to Oliver_Twitchett....


Always the little things...

Sheldon

Billystyx
07-20-2005, 01:04 PM
no worries:)

inhan
08-14-2005, 01:49 AM
Am I mistaken or is that "resizeable" thing supposed to be "resizable"?