pop-up windows margins (2 posts)

  1. emorockchris
    Posted 11 years ago #

    This is my blog:


    when you click on the thumbnails, a pop-up script generates a centered pop-up to the width and height i set it at. the problem is the pop-up window has margins which make the picture off center, i want the new window to fit the pictures exactly. I'm not sure how to go about setting the pop-up window's magins... here is the script i'm using:

    <script type="text/javascript" language="JavaScript">

    // Centered Pop-Up Window (v1.0)
    // (C) 2002-2003 http://www.smileycat.com
    // Free for all users, but leave in this header

    var win = null;
    function newWindow(mypage,myname,w,h,features) {
    var winl = (screen.width-w)/2;
    var wint = (screen.height-h)/2;
    if (winl < 0) winl = 0;
    if (wint < 0) wint = 0;
    var settings = 'height=' + h + ',';
    settings += 'width=' + w + ',';
    settings += 'top=' + wint + ',';
    settings += 'left=' + winl + ',';
    settings += features;
    win = window.open(mypage,myname,settings);


    this is how i utilize it...

    <img src="http://www.emorockchris.com/blog/wp-content/images/thumb-100_2091.jpg" alt="02.25.05" />

  2. emorockchris
    Posted 11 years ago #

    this is how i utilize it*...

    <a href="#null" onClick="newWindow('wp-content/images/100_2091.jpg','','660','505')"><img src="http://www.emorockchris.com/blog/wp-content/images/thumb-100_2091.jpg" alt="02.25.05" /></a>

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.