Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hi all, I have a page with a link

Status
Not open for further replies.

kusarigama

Technical User
Apr 24, 2002
45
DE
Hi all,
I have a page with a link for a Javascript popupwin.
The popup win opens with the picture but the my page where I clicked the link turns into white and on the top left corner is a message saying "[object]. Does anyone know why.
In addition the height tag also doesn't work for my popupwin. It is always doubled ..

Thanx in advance

Olli

Here is the snippet:
<?
$image_size = getimagesize(trim($pic_big[1]));

print&quot;<a href=\&quot;javascript:window.open('bigview.php4?pic_b=&quot;.trim($pic_big[1]).&quot;','&quot;.phot.&quot;','&quot;.&quot;width=&quot;.$image_size[0].&quot;','&quot;.&quot;height=&quot;.$image_size[1].&quot;')\&quot;>++ view large ++</a>&quot;;

?>
 
change to

print&quot;<a href=# onclick=\&quot;window.open('bigview.php4?pic_b=&quot;.trim($pic_big[1]).&quot;','&quot;.phot.&quot;','&quot;.&quot;width=&quot;.$image_size[0].&quot;','&quot;.&quot;height=&quot;.$image_size[1].&quot;')\&quot;>++ view large ++</a>&quot;;


what does it does, is simple, he tries to open the result of the call of the function window.open()

this way, you run the JS when you click the button. and the page stays where it is (except for the going to the top of it because the link is to #).
Anikin
Hugo Alexandre Dias
Web-Programmer
anikin_jedi@hotmail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top