window title problem (html, Javascript)

Associate
Joined
23 Jun 2005
Posts
70
Hi guys
I wonder if you can help me with a problem I am having. I am a newbie when it comes to html and JavaScript so this mite not be a problem and just part JavaScript.

The problem is when I open a window using JavaScript code the title bar of the window has the URL then the TITLE of the page.

How do I get rid of the url from the title bar?


This is the code in the javascript.js
var wOpen = false;
function OpenFormWindow(url,width,height,scroll,posn){
if(wOpen)
popup.close(); //ensure window opens the correct size
var topPosn=0;
var leftPosn=0;
if (posn == "c") {
topPosn=(screen.height - height)/2;
leftPosn=(screen.width - width)/2;
}
var windowprops = "location=0,scrollbars=" + scroll + ",menubar=0,toolbar=0," + "resizable=0,left=" + leftPosn + ",top=" + topPosn + ",width=" + width + ",height=" + height;
popup=window.open(url, "popup", windowprops);
popup.focus();
wOpen = true;
}

This is the code from the page
<input type="button" name="cmdCallMe" value="Call Me" class=BUTTON onClick="Javascript:OpenFormWindow('forms/callme.htm',420,500,0,'c')">

thanks
chris
 
Excuse me for resurrecting forty year old threads, but I stole the above code for my own ends and am having a slight problem - a new page opens, of the right size and all, but on next link click the same page is refreshed to show the new link result. This means a window of the wrong size.
Can anyone shed any light? :)

Code:
	<script type="text/javascript">
	
	var wOpen = false;
	function OpenFormWindow(url,width,height,scroll,posn){
		if(wOpen)
		popup.close(); //ensure window opens the correct size
		var topPosn=0;
		var leftPosn=0;
		if (posn == "c") {
		topPosn=(screen.height - height)/2;
		leftPosn=(screen.width - width)/2;
		}
		var windowprops = "location=0,scrollbars=" + scroll + ",menubar=0,toolbar=0," + "resizable=0,left=" + leftPosn + ",top=" + topPosn + ",width=" + width + ",height=" + height;
		popup=window.open(url, "popup", windowprops);
		popup.focus();
		wOpen = true;
	}
	</script>

I also am trying to change the bgColor of the new window, which I cant get to work :/
 
Back
Top Bottom