1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

javascript works on PC, not on Mac. why?

Discussion in 'Software Development' started by Jane L, Jun 26, 2002.

Thread Status:
Not open for further replies.
  1. Jane L

    Jane L Thread Starter

    Jun 26, 2002
    I'm using javascript to pop up a new window. The new window shows up centered and has an image and text in it. It works fine on PCs, but when on a Mac the new window pops up with nothing in it. Both are using Internet Explorer 5. It worked on a Mac OSX using IE5.1 as well. I would greatly appreciate any ideas or suggestion for fixing this. Here is the extracted code:
    var width=400;
    var height=420;
    var xPos=((screen.availWidth - height)/2);
    var yPos=((screen.availHeight - height)/2);
    var winAttr="width=" + width + ",height=" + height + ",left=" + xPos + ",top=" + yPos + ",resizable=no" + ",scrollbars=no" + ",toobar=no";
    function a2()
    var OpenWindow = window.open("", "a2", winAttr);
    OpenWindow.document.write("<HTML><BODY BGCOLOR='C0C0C0' topMargin=0 marginheight=0 marginwidth=0 leftMargin=0 bottommargin=0 rightmargin=0><TABLE align=center width=100% height=100% border=0 cellpadding=0 cellspacing=0><TR><TD valign=center><CENTER><a href='' onClick='self.close()'>");
    OpenWindow.document.write("<IMG SRC='images/1000571.jpg' border=0 alt='Click to close'>");
    OpenWindow.document.write("</a><BR>┬ęCorey Rich</CENTER></TD></TR></TABLE></BODY></HTML>");
    I do realize this isn't the easiest way to do this - write the code for the second page from the first- but it is what is needed for my application. I got the idea from Joe Burns's JavaScript Goodies book. Please please help me!
  2. Snake~eyes


    Apr 18, 2002
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/84946

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice