45 users online (0 members and 45 guests)  


  Results 1 to 3 of 3

Related

  1. Passing value from parent window to child window    Forum: Javascript Forum
    Replies: 0
  2. Replies: 1
  3. Pop Up Image Window    Forum: HTML Forum
    Replies: 1
  1. #1
    DaWebmasta's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Jul 2004
    Posts
    83

    New Image Window

    ---Hello

    ---Is There A Way To Make A Image Pop Up In A New Window That Is The Size Of The
    ---Image When You Click On The Image Link And If That Is Possible Is There A Way
    ---To Customize The Scroll Bar

    ---Thanx

    ---The Main Event

  2. #2
    coothead's Avatar
    bald headed old fart

    Status
    Offline
    Join Date
    Aug 2003
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    732
    Hi there DaW....,

    here is an example of a window centerd pop-up...
    Code:
    <html>
    <head>
    <title>centered popup</title>
    <base href="http://coothead.homestead.com/files/">
    
    <script type="text/javascript">
    <!--
    function popUp(url,w,h) {
      var x= (screen.width/2 - w/2);
      var y = (screen.height/2 - h/2);
        window.open(url,'','left='+x+',top='+y+',width='+w+',height='+h);
    }
    //-->
    </script>
    
    </head>
    <body>
    
    <div>
    <img src="dog.jpg" alt="" width="100" height="100" onclick="popUp(this.src,400,432)"/>
    </div>
    <div>
    <img src="clouds.jpg" alt="" width="100" height="100" onclick="popUp(this.src,1024,640)"/>
    </div>
    
    </body>
    </html>
    coothead

  3. #3
    DaWebmasta's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Jul 2004
    Posts
    83
    ---Thank Man The Code Works Great

    ---DaWebmasta



Tags for this Thread