I'm having problems creating the popup window I want.

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:

I'm having problems creating the popup window I want.

Post by impulse() »

I'm using window.open at the moment but it's not giving the desired affect. I'm using the following code:

Code: Select all


<p onClick = "window.open('<?php echo $domain; ?>/index.php?action=137&viewid=<?php echo $messageID[$i]; ?>', 'myWindow','height='50, width=50');" > Read Message </p>
But in Firefox it opens a new tab and in IE it always open a new window that's too big, I don't seem to have control over the window size, in the code.

I thought maybe this was due to Firefoxs' popup block but then I used rac.co.uk for a route planner, using Firefox, and I got the exact size popup I wanted. The website is http://www.rac.co.uk. For any non Brits enter the following postcodes for route planning - LA1 1AA (From) E1 1EE (To) then click "Go" and that it the popup I want to create. How is it possible? Window.open seems to be the only mention of popups through the online Javascript tutorials.

Regards,
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

Bad syntax.

'height=50, width=50' is what you're looking for.

You have one too many apostrophes.
impulse()
Forum Regular
Posts: 748
Joined: Wed Aug 09, 2006 8:36 am
Location: Staffordshire, UK
Contact:

Post by impulse() »

I've tried all variations:

'height=50, width=50'
'height=50', '2width=50'
height=50, width=50
height='50', width='50'

None work though. Not does it create a popup rather than a new tab in Firefox.
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

This is not a PHP issue... moved to client side.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Post Reply