Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jun 2006
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Popup Window + picture from DB

    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
    Code:
    <a href="#" onClick="MM_openBrWindow('HERE GOES THE PATH','b','width=640,height=480')">


    into the ENLARGE PICTURE link:


    Code:
    <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

  • #2
    New Coder
    Join Date
    Nov 2005
    Posts
    97
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Code:
    <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.

    PHP Code:
    <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.
    Edit: Nothing that can be considered offensive in the signature, please. // liorean

    www.moresense.co.uk


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •