...

View Full Version : Popup Window + picture from DB



aldodager
06-23-2006, 10:59 PM
I have a link that says: CLICK HERE TO ENLARGE... if you click it, it will take you to another page in the same browser window... i dont want to use _blank beacuse i need a browser window with a 640 pixels width and 480 pixels height...

the answer: POPUP WINDOW...

Probably I've been working too much, but i cant find a way to add the popup window code:

CODE

<a href="#" onClick="MM_openBrWindow('HERE GOES THE PATH','b','width=640,height=480')">



into the ENLARGE PICTURE link:



<form name="form_picture" method="post" action="picture.php">

<input type=hidden name=id_item>

<a href="#" <?echo "onclick=gotopicture(" . $item_id . ")";?>><strong>Click here to enlarge the
picture</strong></a>

</form>

thanks for the help guys... i really appreciate it

alexpayne
06-23-2006, 11:25 PM
<script type="text/javascript">
function openPopup(mypage, myname, w, h, scroll){
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}
</script>
stick this lot in your <head> bit.


<a href="javascript:openPopup('http://<?php echo $_SERVER['HTTP_HOST']?>/index.php?tab=gallery&photo=<?php echo $picture[No]?>', 'Netball', 537, 550, 'Yes')">
and then call the above.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum