SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Zealot jsk137's Avatar
    Join Date
    Jan 2002
    Posts
    151
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    fullscreen new window (using width and height - not 'fullscreen')

    I have this code that works in IE and in NS4.78 but not in NS6 (as tested on WIN2000). It opens a stripped window (only title bar) that is matched to the screen size at which the monitor is set. I will be using this to display Flash tutorials on an intranet site for my day job.

    Here is the code:

    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <SCRIPT LANGUAGE="JavaScript">

    function openindex()
    {
    var w = screen.width;
    var h = screen.height;
    OpenWindow=window.open("", "newwin", "height=h, width=w,toolbar=no,scrollbars="+scroll+",menubar=no");
    OpenWindow.document.write("<TITLE>Title Goes Here</TITLE>")
    OpenWindow.document.write("<BODY BGCOLOR=#FFFFCC>")
    OpenWindow.document.write("<h1>Hello!</h1>")
    OpenWindow.document.write("This text will appear in the window!<br>")
    OpenWindow.document.write("Width=")
    OpenWindow.document.write(w)
    OpenWindow.document.write("<br>")
    OpenWindow.document.write("Height=")
    OpenWindow.document.write(h)
    OpenWindow.document.write("</BODY>")
    OpenWindow.document.write("</HTML>")

    OpenWindow.document.close()
    self.name="main"
    }
    </SCRIPT>


    </head>

    <body bgcolor="#FFFFFF" text="#000000" onLoad="openindex()">

    </body>
    </html>
    Any ideas to get this to work with NS6 (or NS7) or why is doesn't now?

    Thanks for your help in fixing this.

    JEFF

  2. #2
    Perl/Mason Guru Flawless_koder's Avatar
    Join Date
    Feb 2002
    Location
    Gatwick, UK
    Posts
    1,206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    why not actually open it fullscreen?

    Flawless
    ---=| If you're going to buy a pet - get a Shetland Giraffe |=---

  3. #3
    SitePoint Zealot jsk137's Avatar
    Join Date
    Jan 2002
    Posts
    151
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    fullscreen works IE only (unless I am mistaken)

    I actually have some code now that is working on IE, NS4.78 and NS6.2. I am tweeking it now to get it to center on the screen and have some other flexablility. I will post it here shortly.

  4. #4
    Perl/Mason Guru Flawless_koder's Avatar
    Join Date
    Feb 2002
    Location
    Gatwick, UK
    Posts
    1,206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You may be right with that.

    Remember that some users don't use single pan monitors.

    I'm on a dual head with one 1280 and one 1024 stretched...

    people forget that and it really annoys me!

    Flawless
    ---=| If you're going to buy a pet - get a Shetland Giraffe |=---

  5. #5
    SitePoint Zealot jsk137's Avatar
    Join Date
    Jan 2002
    Posts
    151
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Flawless_koder,

    Then I will be real interested in how this behaves on your system. (I don't have that setup in my audience, but it will be good to know.)

    Jeff

  6. #6
    Perl/Mason Guru Flawless_koder's Avatar
    Join Date
    Feb 2002
    Location
    Gatwick, UK
    Posts
    1,206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    All you have to do is make sure that when / IF you move it - you don't assume it's on 0,0 vector ... normally take the size of the screen - and add to it the screenLeft of the opening window.

    Flawless
    ---=| If you're going to buy a pet - get a Shetland Giraffe |=---

  7. #7
    Perl/Mason Guru Flawless_koder's Avatar
    Join Date
    Feb 2002
    Location
    Gatwick, UK
    Posts
    1,206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The search window in thermeoneurope.com takes it into account ( although the search doesn't actually work ... well - it does - but i'm writing it now )

    Flawless
    ---=| If you're going to buy a pet - get a Shetland Giraffe |=---

  8. #8
    SitePoint Zealot jsk137's Avatar
    Join Date
    Jan 2002
    Posts
    151
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    OK, now this works great with IE and NS6.2 (on WIN2000) but not on NS4.78.

    Seems that NS4.78 maybe isn't using the width, height, top, left settings(?). 'Cause if I don't set the left, top properties then I get a full screen version in NS4.78. Hmmm... interesting...

    Here is the code:

    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <SCRIPT LANGUAGE="JavaScript">

    function openindex()
    {
    var w = window.screen.width-40;
    var h = window.screen.height-100;
    var winl = ((window.screen.width-w) / 2);
    var wint = ((window.screen.height-h) / 2);
    OpenWindow=window.open("", "newwin", "height="+h+", width="+w+", left="+winl+", top="+wint+", toolbar=no,scrollbars="+scroll+",menubar=no");
    OpenWindow.document.write("<TITLE>Title Goes Here</TITLE>")
    OpenWindow.document.write("<BODY BGCOLOR=#FFFFCC>")
    OpenWindow.document.write("<h1>Hello!</h1>")
    OpenWindow.document.write("This text will appear in the window!<br><br><br>")
    OpenWindow.document.write("Width=")
    OpenWindow.document.write(w)
    OpenWindow.document.write("<br>")
    OpenWindow.document.write("Height=")
    OpenWindow.document.write(h)
    OpenWindow.document.write("</BODY>")
    OpenWindow.document.write("</HTML>")

    OpenWindow.document.close()
    self.name="main"
    }
    </SCRIPT>


    </head>

    <body bgcolor="#FFFFFF" text="#000000" onLoad="openindex()">

    </body>
    </html>
    What do you think??

  9. #9
    Perl/Mason Guru Flawless_koder's Avatar
    Join Date
    Feb 2002
    Location
    Gatwick, UK
    Posts
    1,206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmmm - sorry Jeff, but i'm barely NN compatible for version 6. I don't ever bother with versions less than 5 at all - i just can't justify spending all the time making things work
    for them when they go to all the trouble of not supporting half the dom and half of css.

    Netscape 6 is far better though.

    Marco might know - he's one of those compatibility fools

    Flawless
    ---=| If you're going to buy a pet - get a Shetland Giraffe |=---


Bookmarks

Posting Permissions

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