JavaScript Window.open()

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gvamohan
    New Member
    • May 2007
    • 4

    JavaScript Window.open()

    hai every one iam opening an window through javascript
    [removed email]

    Code:
    <script type="text/javascript" language="javascript">
            var k=false;
            
            window.open("main.aspx","","status=no,fullscreen=yes");
            window.resizeTo(1,1)
            k=true;
            window.onresize = function()
            {
               if(k==true)
               { 
                    window.opener="s";
                    window.close(); 
               }
            } 
       </script>  
       
    </head>
    <body onload="javascript:window.opener='x';window.close();" >  
    </body>
    it works perfect with fullscreen mode even without titlebar where in if hosted in an server and accessing via tcp/ip network its opening with titlebar and not in full screen can any one say solution for this or any setting to be made in server?
    Last edited by acoder; Sep 20 '08, 03:55 PM. Reason: Added [code] tags + removed email
  • Rsmastermind
    New Member
    • Sep 2008
    • 93

    #2
    Hi this could be a solution to your code:

    Sometimes if you are giving fullscreen does not works better assign the window attribute in this manner.

    This is working in all environment with server


    [HTML]<html>
    <head>
    <title>Whatev er You like</title>
    <script language="JavaS cript">
    function openWin() {
    var maxWindowWidth = screen.width - 10;
    var maxWindowHeight = screen.height - 76;
    var a=window.open(" name of the page you want to open","_blank", "top=0,left=0,m enubar=0,titleb ar=0,toolbar=0, status=1,resiza ble=no,height=" + maxWindowHeight + ",width=" + maxWindowWidth) ;
    a.focus();
    window.opener = null;
    window.close();
    }
    </script>
    </head>
    <body onload="openWin ()"><br><br><br ><br><br><br><b r><br><br>
    <center><a class="my desire" href="javascrip t:openWin</a></center>
    </body>
    </html>[/HTML]
    Last edited by acoder; Sep 20 '08, 03:56 PM. Reason: Added [code] tags

    Comment

    • acoder
      Recognized Expert MVP
      • Nov 2006
      • 16032

      #3
      Please use code tags when posting code. I have removed the email from your post. Posting of email addresses is against the site rules. See unacceptable things.

      Note that fullscreen is not supported any longer even in IE.

      Comment

      • gvamohan
        New Member
        • May 2007
        • 4

        #4
        But same problem exists. Even with ur code i am getting title bar.

        Comment

        • Rsmastermind
          New Member
          • Sep 2008
          • 93

          #5
          If you are opening the window in IE +4 then its guarantee with the above code that it will not show any toolbar.Please if possible post the rectified code which you are using or which is creating the problem.

          Comment

          • acoder
            Recognized Expert MVP
            • Nov 2006
            • 16032

            #6
            It will usually show the title bar though. See, for example, Note on Fullscreen.

            Comment

            Working...