Jump to content

Opening a window without a title bar


Kosher Kid
 Share

Recommended Posts

Like many others, I seek to open a window without a title bar. In this case, I want to use it as a popup topic that can display html content (specifically animations illustrating how to accomplish specific tasks).I came across an article on the web which claims this can be done:http://www.htmlgoodies.com/beyond/javascri...cle.php/3471181here is the code I'm using:function OpenPopup(htmlfile){//show an html file in a popup window window.open(htmlfile, "myWin", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,fullscreen=yes"); window.event.cancelBubble=true; window.event.returnValue=false;}then in the html file:<script type=text/javascript>self.resizeTo(424,553)</script>also, included in the body tag is: style="overflow:hidden"The OpenPopup code works in that it opens a fullscreen window with no title bar, scroll bars, etc. in windows explorer (nothing I've found will do this in firefox).The problem is that no matter what I try, I cannot get the window to resize.Any thoughts?

Link to comment
Share on other sites

Just tested this and it works ok in IE6 SP2 and FF 1.5.0.1

<body><script>window.open ("http://www.google.com","mywindow","menubar=1,resizable=1,width=350,height=250");</script></body>

Link to comment
Share on other sites

no...I am trying to get a window to display without a title bar. The trick I picked up from the website cited in my initial post said to create a window fullscreen and then resize it.I have no problem creating a full screen window with no title bar...the problem is, that once that window is created, I cannot get it to resize to the size I actually want.

Link to comment
Share on other sites

if you look at my original post on this topic, you'll see that that is the link i cited as the source for my attempt.of course, i tried executing the code as it was specified...it didn't work. i even tried some variations on it, such as not trying to pass the resize data as a variable but giving it explicitely; i also tried to avoid creating a window handle by simply stating self.resizeTo but nothing worked. i've been looking around on the web and at microsoft's msdn site and am beginning to suspect that once a window is specified as full screen, that's it...it cannot be resized by code. but i'm hoping you wise and experienced gurus may know something i don't. :angry::(:blink::blink::):):):blink::blink:

Link to comment
Share on other sites

  • 4 months later...

Here is what I use for pup-ups when im doing in-game screenshots or something like that:

<html><head><script type="text/javascript"><!--function popup(mylink, windowname){if (! window.focus)return true;var href;if (typeof(mylink) == 'string')   href=mylink;else   href=mylink.href;window.open(href, windowname, 'width=800,height=600,scrollbars=no');return false;}//--></script></head><body><!-- Here are two different popups using the same function --><a   href="testpopup.html"    onClick="return popup(this, 'hello')">my popup</a><br /><br /><a   href="anothertest.html"    onClick="return popup(this, 'diditwork')">another</a></body></html>

Ok so thats the page that has the links to the popups. Now we can make pages for the popups! The only thing you need to remember is that you need to focus the window or people will not know where it is!Here could be a sample page:

<html><head><script TYPE="text/javascript"><!--window.focus();//--></SCRIPT></head><body>hello</body></html>

Sorry if that doesnt help but i hope it does.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...