how to open a window without title bar?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nirmalsingh
    New Member
    • Sep 2006
    • 218

    how to open a window without title bar?

    hi experts, l just want to open a window without title bar,maximize and minimize button, and close button. is there is any way to do like that? if yes, how can i do that?
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    You could try "titlebar=n o", but it probably won't work:
    Originally posted by W3Schools
    titlebar=yes|no |1|0
    Whether or not to display the title bar. Ignored unless the calling application is an HTML Application or a trusted dialog box. Default is yes
    You could try 'fullscreen=yes ', but it only used to work in IE (I don't know if it still does).

    Comment

    • acoder
      Recognized Expert MVP
      • Nov 2006
      • 16032

      #3
      I should add that this is not good practice at all. The user won't be able to move the window around. They can't close the window unless you give them a close option. You're taking away control from the user and usually most users hate that.

      Comment

      • nirmalsingh
        New Member
        • Sep 2006
        • 218

        #4
        Originally posted by acoder
        I should add that this is not good practice at all. The user won't be able to move the window around. They can't close the window unless you give them a close option. You're taking away control from the user and usually most users hate that.
        what could i do for that acoder? its my task to do.

        Comment

        • acoder
          Recognized Expert MVP
          • Nov 2006
          • 16032

          #5
          What do you need it for? I'm sure there is a better alternative.

          Comment

          • dorinbogdan
            Recognized Expert Contributor
            • Feb 2007
            • 839

            #6
            You could use a DIV to simulate the same behavior.

            However, I wrote for IE a small sample using an .hta file launched with WScript.Shell.
            In the following .htm main file just update the path of .hta file:
            [HTML]<html>
            <head>
            <script language="JavaS cript">
            function show(){
            new ActiveXObject(" WScript.Shell") .Run("d:\\temp\ \notitle.hta",3 ,false);
            }
            </script>

            </head>
            <body>
            <input type="button" value="Show" onclick="show() ">
            </body>
            </html>[/HTML]

            The following code is the .hta file (without titlebar):
            [HTML]<html>
            <head>
            <HTA:APPLICATIO N
            ID="objNoTitleB ar"
            APPLICATIONNAME ="Window Without a Title Bar"
            SCROLL="auto"
            SINGLEINSTANCE= "yes"
            CAPTION="no"
            >
            </head>
            <SCRIPT LANGUAGE="Javas cript">
            function CloseWindow(){
            self.close();
            }
            </SCRIPT>

            <body bgcolor="#bbaaa a">
            <input type="button" value="Close Me" onclick="CloseW indow()">
            </body>
            </html>[/HTML]

            The only bad issue is that, when click first time the Show button, the IE security warning displays.

            Comment

            • acoder
              Recognized Expert MVP
              • Nov 2006
              • 16032

              #7
              Good work there (even though it is only for IE) - I haven't tested it yet. Just one thing - I disapprove of ActiveX solutions unless it's for e.g. an intranet when you can be sure that all users within the organisation will use IE and nothing else. Also, these kinds of unexpected behaviours such as removing the basics like title bars are only acceptable in these closed browsing sessions. They are simply not acceptable in the WWW. For that, you want to give a trouble-free cross-browser solution (as far as possible).

              Comment

              • acoder
                Recognized Expert MVP
                • Nov 2006
                • 16032

                #8
                Originally posted by dorinbogdan
                You could use a DIV to simulate the same behavior.
                This is much the preferred behaviour (that is, if the popup is even needed).

                Comment

                • nirmalsingh
                  New Member
                  • Sep 2006
                  • 218

                  #9
                  thank a lot for code. its working well. but with firefox...?

                  Comment

                  • acoder
                    Recognized Expert MVP
                    • Nov 2006
                    • 16032

                    #10
                    Originally posted by nirmalsingh
                    thank a lot for code. its working well. but with firefox...?
                    Exactly why I disapprove of it. You can get a lot of ActiveX solutions (which are prone to security problems), but they will only work in IE.

                    What are you trying to do? I'm sure there is a better alternative that will work in all browsers.

                    Comment

                    • dorinbogdan
                      Recognized Expert Contributor
                      • Feb 2007
                      • 839

                      #11
                      I could not find yet a FireFox method, it seems that is more restrictive...
                      I learned that Mozilla does not allow to run ActiveX, others than its internal objects....

                      It allows to only change the title on the titlebar.

                      I'm still looking further for a solution...

                      Comment

                      Working...