PDA

View Full Version : how 2 avoid the titlebar using javascript


RaZeN
04-04-2005, 02:24 PM
using window.open() we create a pop up that has certain zize,with/without scrollbar, statusbar,explorerbar....but what i want is 2 remove the title bar also...is there any code Plz help me.....

A1ien51
04-04-2005, 02:41 PM
You cannot remove the title bar....

rlemon
04-04-2005, 03:22 PM
No you cannot create a popup without a titlebar but you can make a sudo popup that has no titlebar.

try something like this:

<html>
<head>
<title>title</title>
<style>
table.PopUp {
width: 300px;
height: 400px;
border-collapse: border-collapse;
border: 2px solid #000000;
background-color: #ffffff;
}

table.PopUp td {
border: 1px solid #000000;
}

#colorPalette {
position: absolute;
}
</style>
<script>
function getElement(aID){
var rv = (document.getElementById) ? document.getElementById(aID) :
document.all[aID];
return rv;
}
function togglePopUp() {
e = getElement('PopUp');
e.style.visibility = e.style.visibility=='hidden'?'':'hidden';
}
</script>
</head>
<body>
<div id="PopUp" style="visibility: hidden;">
<table class='PopUp' cellpadding=0 cellspacing=1>
<tr>
<td height="100%" width="100%">Your Popup Content</td>
</tr>
</table>
</div>
<a href="#" OnClick="togglePopUp()">Open/Close Popup</a>
</body>
</html>

DR.Wong
04-04-2005, 03:53 PM
Have you Considered a widget?

They are little windows that you actually design yourself, you can add all of the usual window controls and make them custom colours and styles.
Also you can move some of them around like normal windows.

Check out the Silby Java library (if you can find it floating around on the net) its free and it shows you how to make them!

Hope I helped!

rlemon
04-04-2005, 05:01 PM
I will agree with DR.Wong Widgets will most likely be the best used (i think) in your scenario.