[SOLV]Javascript: window.open creating a new tab not window.

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
impulse()
Forum Regular
Posts: 748
Joined: Wed Aug 09, 2006 8:36 am
Location: Staffordshire, UK
Contact:

[SOLV]Javascript: window.open creating a new tab not window.

Post by impulse() »

In the past I've used the window.open Javascript function to open a new window in Firefox but now it's only opening a new tab in Firefox. This is the line of code I'm using:

Code: Select all

<input type = 'submit' onClick = "window.open('www.google.com', 'height = 100, width = 200');">
I have tried this line of code in IE and that reports errors on the page but doesn't explain why. Firefoxs' error console doesn't report any errors while using the button.

Can anybody see what is causing this?

Regards,
Last edited by impulse() on Thu May 10, 2007 4:37 pm, edited 1 time in total.
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

the window opening in a tab instead of a new window is a setting in firefox. this is something only the use has controller over.
impulse()
Forum Regular
Posts: 748
Joined: Wed Aug 09, 2006 8:36 am
Location: Staffordshire, UK
Contact:

Post by impulse() »

Many days later I find out this was because I hadn't named the window.

Code: Select all

<input type = 'submit' onClick = "window.open('www.google.com', 'height = 100, width = 200');">
should be

Code: Select all

<input type = 'submit' onClick = "window.open('www.google.com', '<nameOfWindowHere>', 'height = 100, width = 200');">
Post Reply