Page 1 of 1

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

Posted: Sat Feb 17, 2007 7:17 pm
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,

Posted: Sat Feb 17, 2007 7:22 pm
by superdezign
Bad syntax.

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

You have one too many apostrophes.

Posted: Sat Feb 17, 2007 7:32 pm
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.

Posted: Sat Feb 17, 2007 7:56 pm
by Luke
This is not a PHP issue... moved to client side.

Posted: Sat Feb 17, 2007 9:30 pm
by feyd