Web Analytics Made Easy -
StatCounter Javascript Popup Problem - CodingForum

Announcement

Collapse
No announcement yet.

Javascript Popup Problem

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Javascript Popup Problem

    Hey all,
    I'm having a small cross platform problem. I'm currently using a automatic javascript popup, for web gallery, and it works fine for IE on windows. They main problem is when I view on Mac IE.
    This is how it's set up. I have a seperate file (popup.html) that is housed in the same folder as the gallery html. In the main html file, there is a javascript popup code that activates the popup.html. The problem is that in Mac IE, it leaves a small amount a space where the scrollbars are. The popup isn't flush to the edge. The code is below. Can anybody help???
    What can I add to the code below to solve this problem?

    <----MAIN.HTML CODE----->
    function PopupPic(sPicURL) {
    window.open( "popup.html?"+sPicURL, "","resizable=1,HEIGHT=200,WIDTH=200");
    }
    <----END----->

    <----POPUP.HTML CODE----->
    <HTML>
    <HEAD>
    <TITLE>Gallery</TITLE>
    <script language='javascript'>
    var arrTemp=self.location.href.split("?");
    var picUrl = (arrTemp.length>0)?arrTemp[1]:"";
    var NS = (navigator.appName=="Netscape")?true:false;

    function FitPic() {
    iWidth = (NS)?window.innerWidth:document.body.clientWidth;
    iHeight = (NS)?window.innerHeight:document.body.clientHeight;
    iWidth = document.images[0].width - iWidth;
    iHeight = document.images[0].height - iHeight;
    window.resizeBy(iWidth, iHeight);
    self.focus();
    };
    </script>
    </HEAD>
    <BODY bgcolor="#000000" onload='FitPic();' topmargin="0"
    marginheight="0" leftmargin="0" marginwidth="0">
    <script language='javascript'>
    document.write( "<img src='" + picUrl + "' border=0>" );
    </script>
    </BODY>
    </HTML>
    <----END----->

  • #2
    Try, in popup, eliminate the scroll (I hope the virtual space ocupied either - I have no Mac to verify) bar using CSS

    <head>
    <style type="text/css">
    <!--
    body {overflow: hidden;}
    -->
    </style>
    </head>
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

    Comment


    • #3
      Originally posted by Kor
      Try, in popup, eliminate the scroll (I hope the virtual space ocupied either - I have no Mac to verify) bar using CSS

      <head>
      <style type="text/css">
      <!--
      body {overflow: hidden;}
      -->
      </style>
      </head>

      Where would I refer to the CSS script in which part of my script? You said popup.html? or in the gallery.html?

      Comment

      Working...
      X