Solved

Opening a Window without a Titlebar

Posted on 2001-08-27
6
201 Views
Last Modified: 2012-05-04
Is this possible, and how is it done?
That is, what feature would be set on a window.open()?
0
Comment
Question by:Clif
  • 4
  • 2
6 Comments
 
LVL 1

Expert Comment

by:kanthonym
ID: 6428949
Probably noit possible if you are talking about the title bar above the file menue. However, you can not place title infomration in there.

<script language='javascript'>
//-- This function opens the new, empty window named floater.
function openWindow() {
   winStats='toolbar=no,location=no,directories=no,menubar=no,'
   winStats+='scrollbars=no,width=275,height=175'
   if (navigator.appName.indexOf("Microsoft")>=0) {
      winStats+=',left=10,top=25'
    }else{
      winStats+=',screenX=10,screenY=25'
    }
   floater=window.open("","",winStats)    
}
0
 
LVL 1

Expert Comment

by:kanthonym
ID: 6429074
More window related code.


<SCRIPT LANGUAGE="javascript">
<!--
window.open ('titlepage.html', 'newwindow', config='height=100,
width=400, toolbar=no, menubar=no, scrollbars=no, resizable=no,
location=no, directories=no, status=no')
-->
</SCRIPT>
0
 
LVL 1

Accepted Solution

by:
kanthonym earned 100 total points
ID: 6429129
HERE YOU GO!.

IF this does not make sense see the code examples and text at the link below.

 
 

New Window: No Title Bar
by Joe Burns, Ph.D.
Use these to jump around or read it all...


[Button Code]
[The Script]
[OnLoad the Window]

In my tutorial dedicated to opening new windows through JavaScript, I made the statement you could not open a new window that didn't have a title bar. Don't check. It doesn't say that any more.

A reader saw that statement and informed me that he knew of a method and gave me the basics. I took those steps and put together the script in this tutorial. It's a new window that opens without a title bar. The effect is created by using the open.window JavaScript along with the fullscreen code discussed in this tutorial.

Sorry to say that even though the fullscreen and JavaScript commands work in Netscape, the loss-of-title-bar effect only works in Internet Explorer. However, I've bulked up the script so that not only do you have control over the title bar, but also o over the window's size and placement on the screen. It's a neat little piece of work. Dig this:


 
Neat effect, eh?

Hey, did you get a scrollbar? Yeah. Me too. I have the scrollbars set to "no" but that thing still pops up. Strange, huh? If you'd like to get rid of the scrollbar too, then follow a tip given to me by Neil Brocklebank.

In the page that opens in the new window put the style command:

style="overflow:hidden"

...in the BODY flag. Now, remember. That goes in the BODY flag of the page that is opening inside the new window, not the page that contains the script. That's real important.



--------------------------------------------------------------------------------


Button Code
It goes like this:
<CENTER>
<FORM>
<input type="button" VALUE="click me!" onClick="goNewWin()">
</FORM>
</CENTER>


It's a basic FORM button that is set up to fire a function named "goNewWin()". That's about all there is to it. Let's see that script.



--------------------------------------------------------------------------------


The Script Code
The script is inside of a function. Here it is:
<script language="JavaScript">

function goNewWin() {

// Set height and width
var NewWinHeight=200;
var NewWinWidth=200;

// Place the window
var NewWinPutX=10;
var NewWinPutY=10;

//Get what is below onto one line

TheNewWin =window.open("untitled.html",'TheNewpop',
'fullscreen=yes,toolbar=no,location=no,directories=no,
status=no,menubar=no,scrollbars=no,resizable=no');

//Get what is above onto one line

TheNewWin.resizeTo(NewWinHeight,NewWinWidth);
TheNewWin.moveTo(NewWinPutX,NewWinPutY);

}
</script>

We start by setting four parameters:

// Set height and width
var NewWinHeight=200;
var NewWinWidth=200;

// Place the window
var NewWinPutX=10;
var NewWinPutY=10;

http://www.htmlgoodies.com/beyond/notitle.html

Good Luck!
 
 
 
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
LVL 10

Author Comment

by:Clif
ID: 6429252
kanthonym:
Thanks for your help so far.

this is really close.  There are two problems, though.  First of all, there is a definite lag during the window opening before it gets resized.  Second, the "fullscreen" feature is (according to my documentation) only used in IE4.
0
 
LVL 10

Author Comment

by:Clif
ID: 6429258
kanthonym:
I'm go9ng to go ahead and grade your answer.  It does work (at least in IE), although there is that annoying lag.

I just discovered what I was trying to do can't be done in Netscape anyway, so I'll have to try and find another plan.

Thanks for your help.
0
 
LVL 1

Expert Comment

by:kanthonym
ID: 6429265
Thanks, best of luck in your search. I would be very interested in any answers you find.  katnthonym@hotmail.com
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now