Problem in opening popup window

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
eshban
Forum Contributor
Posts: 184
Joined: Mon Sep 05, 2005 1:38 am

Problem in opening popup window

Post by eshban »

feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


Hello,

I am facing a little problem. I have an image. I get its dimensions by using php method "getimagesize()".

It returns me the image height and image width.

Now i open a popup window, according to this height and width.

But the popup window will not open exactly at this size

Here is my code:

Code: Select all

$img_size = getimagesize("images/kitoptions/large/".$lar_img."");
$h = $img_size[0];
$w = $img_size[1];

<a href="#" onClick="window.open('viewkit_large_image.php?val=<?=$lar_img?>
','Popup','left=120,top=75,width=<?=$w?>,height=<?=$h?>,scrollbars=yes')">
suppose $h = 550
and $w = 400

so according to my code, the popup window opened, must be off this size. but this not happens.

kindly tell me that how to solve this problem

plz reply

thanks


feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
willgnosis
Forum Newbie
Posts: 2
Joined: Mon Apr 10, 2006 2:10 am

Post by willgnosis »

unfortunately there is a minimum size for pop ups windows... a new implementation of Microsofts IE
it may look correct in Safari on mac...but thats about it. pretty sure firefox does it too.
no way round it i know of.

;-)
eshban
Forum Contributor
Posts: 184
Joined: Mon Sep 05, 2005 1:38 am

it works

Post by eshban »

it is possible sir,

i got the script. it works well

check it

http://www.braemoor.co.uk/software/openpopup.shtml
Post Reply