We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now

x

How to hide the Title bar without "fullscreen=yes" when use window.open?

kanelkl
kanelkl asked
on
Medium Priority
542 Views
Last Modified: 2010-08-05
i want to open one new window with window.open,
but i don't want to see the title bar, and i can set the left, top, width, and height, etc.

how to do ?

thanks.
Comment
Watch Question

Author

Commented:
i use "titlebar=no", but can't hide the titlebar.

Commented:
Hi kanelkl,

should be:

Netscape Navigator (4 & newer):
  window.open("url", "windowName", "titlebar=false");
IE (5 & newer):
  window.open("url", "windowName", "title=false");

This feature, in Navigator 4+, requires a signed script.

mvan

Author

Commented:
mvan:
thanks very much.

i used "title=false", but the title bar is showing.

i use windows and ie5,ie6.

Author

Commented:
here i have a way.

var o = window.open("","","");
o.moveTo(0,-24);
o.resizeTo(1024,788);

if you have any other better ways, please tell me .

thanks.
Michel PlungjanIT Expert
CERTIFIED EXPERT
Top Expert 2009

Commented:
You cannot turn off the title bar unless you
1. sign the script in gecko based browsers
2. use HTA in IE

Michel
Commented:
kanelkl,

Michel is right.  My "title=false" was old info.  HTA is the way to go.

http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/methods/open_0.asp

Here's some code.  Save it in a file named with an extension of .hta to give it access to the special HTA features.

mvan

<HEAD>
  <TITLE>My Monster Application</TITLE>
  <HTA:APPLICATION ID="oMyApp"
    APPLICATIONNAME="monster"
    BORDER="none"
    CAPTION="no"
    ICON="/graphics/creature.ico"
    SINGLEINSTANCE="yes"
    WINDOWSTATE="maximize">
</HEAD>
<BODY>
CAPTION="no" is the key to no title bar<br>
<br>
Press [Alt]+[F4] to end (no Minimize, Maximize, nor Close buttons!).
</BODY>

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Commented:
This doesn't actually open a new window, it simply changes the window into which it is opened.  There are warnings and restrictions if HTA files are run from a server.

mvan

Commented:
Send that filename.hta as a url in window.open("url").  If you leave out WINDOWSTATE="maximize", it need not be fullscreen.  You also don't need ICON="/graphics/creature.ico" - of course.  Then you have an essentially floating window, without borders, titles, etc.  If you sized it right and had the .hta load a graphic image, it could look very similar to a 'splash screen' of the major software folks.  You'd want to be sure to window.close() it from the JavaScript that opened it - I doubt the average user would guess [Alt]+[F4].

As noted, there are warnings and restrictions, even if you run the thing from your own local drive.

Peace and joy.  mvan
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.