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 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Jan 2006
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Pop up window size and border

    Hi,

    I am using Dreamweaver to open a pop up window when you click in a thundnail to make the picture bigger. In Dreamweaver you have the option to specify the dimensions of the pop up window(in my case the same as the photograph). It seems to work fine in Explorer, but Safari leaves a white border along the right and bottom edges(aprox 14 pix). I have tried to do the window smaller but then in other browsers you need scroll bars. I would like the new window be exactly the same size of the photograph. Is there any easy way to control this? I have experience designing with css, but never worked with javascript.

    Thank you very much for any advice about this,

    Tucho

  • #2
    Senior Coder
    Join Date
    Apr 2005
    Posts
    1,051
    Thanks
    0
    Thanked 0 Times in 0 Posts
    on the popup page

    document.body.resize(h,w);

    document.body.resize(imgObj.innerHeight,imgObj.innerWidth);

    havn't tested it. look into that tho.
    public string ConjunctionJunction(string words, string phrases, string clauses)
    {
    return (String)(words + phrases + clauses);
    }
    <--- Was I Helpfull? Let me know ---<

  • #3
    New to the CF scene
    Join Date
    Jan 2006
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi rlemon!

    Thanks for your answer. Since i am using Dreamweaver I do not have access to the pop up window. All javascript is in the thundnail page as follow. I have tried to paste your code inside the javascript below, but it seems not to affect the final image.
    Let me know if you have any ideas, and thanks again

    Tucho

    <!--
    function MM_openBrWindow(theURL,winName,features) { //v2.0
    window.open(theURL,winName,features);
    }
    //-->
    </script>
    </head>

    <body>
    <div id="wrapper">
    <div id="main"><a href="javascript:;" onclick="MM_openBrWindow('images/atglitters02g.jpg','','width=361,height=361')"><img src="images/over-allp.jpg" name="image1" border="0" id="image1" /></a> <a href="javascript:;" onclick="MM_openBrWindow('images/legsg.jpg','','width=361,height=361')"><img src="images/atglitters01p.jpg" width="90" height="90" border="0" /></a> <a href="javascript:;" onclick="MM_openBrWindow('images/all02g.jpg','','width=478,height=360')"><img src="images/atglitters06p.jpg" width="120" height="90" border="0" /></a> <a href="javascript:;" onclick="MM_openBrWindow('images/atglitters03g.jpg','','width=360,height=360')"><img src="images/videop.jpg" width="90" height="90" border="0" /></a> <a href="javascript:;" onclick="MM_openBrWindow('images/atglitters05g.jpg','','width=434,height=360')"><img src="images/atglitters05p.jpg" width="108" height="90" border="0" /></a> <a href="javascript:;" onclick="MM_openBrWindow('images/atglitters04g.jpg','','width=360,height=360')"><img src="images/gold-shoesp.jpg" width="90" height="90" border="0" /></a> </div>

  • #4
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,630
    Thanks
    0
    Thanked 648 Times in 638 Posts
    When you just load an image into a popup window you get the default margins around it which are different from one browser to another. Either make the window big enough so that the image can display with a white border (not necessarily evenly on all sides) or put the image into a web page and load that into the popup window instead. With a web page you can put body {margin:0} into the stylesheet to get the image right into the top left corner.

    See http://javascript.about.com/library/blpop.htm and http://javascript.about.com/library/blpopup9.htm for more about how to do this.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.


  •  

    Posting Permissions

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