Skip to main content
Inspiring
November 7, 2006
Question

Open window php

  • November 7, 2006
  • 2 replies
  • 298 views
I would like to open a window if a user clicks on an image to enlarge
it. Here's the code:

<img src="<?php echo $row_rssport['result_pic']; ?>" alt="<?php echo
$row_rssport['result_picalt']; ?>" border="0" class="imgright"
onclick="window.open('sport_picbig.php?result_id=<?php echo
$row_rssport['result_id']; ?>','',450,450,'0:0','sc','r');return false"
<?php echo $dims; ?> /></a> <?php } ?>

It works in IE7, that's fine, but only a very small window opens in FF2.
So there is probably something wrong in my code. Can someone point me
into the right direction?

Martin
This topic has been closed for replies.

2 replies

Inspiring
November 12, 2006
Mick White wrote:
> It seems that you are using MS only window features, try the following:
> onclick="window.open(
> 'sport_picbig.php?result_id=
> <?php echo $row_rssport['result_id']; ?>,
> \"height=450,width=450,left=0,right=0\"); return false';">

Hi Mick,

yeah - that works. One good message on Sunday, while I'm still messing
around with D8.

Thank you!

Martin
Inspiring
November 12, 2006
Martin Lang wrote:

> I would like to open a window if a user clicks on an image to enlarge
> it. Here's the code:
>
> <img src="<?php echo $row_rssport['result_pic']; ?>" alt="<?php echo
> $row_rssport['result_picalt']; ?>" border="0" class="imgright"
> onclick="window.open('sport_picbig.php?result_id=<?php echo
> $row_rssport['result_id']; ?>','',450,450,'0:0','sc','r');return false"
> <?php echo $dims; ?> /></a> <?php } ?>
>
> It works in IE7, that's fine, but only a very small window opens in FF2.
> So there is probably something wrong in my code. Can someone point me
> into the right direction?
>
> Martin

It seems that you are using MS only window features, try the following:
onclick="window.open(
'sport_picbig.php?result_id=
<?php echo $row_rssport['result_id']; ?>,
\"height=450,width=450,left=0,right=0\"); return false';">

Mick