Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change Window Status

Status
Not open for further replies.

BML

Programmer
Oct 24, 2000
37
PT
HI,

I have two HTML pages, in the first page I call the second that have to appear in the same window, like this:
Code:
 window.open("home.html", "_self", "status=no");
the third parameter (status=no), is to disable the status bar from the browser (IE 4.0), but that doesn't work...

why ???

is there a way to disable all the things in the window ???

if I open the second page on another window:
Code:
 window.open("home.html", null, "status=no");
it work's fine...but I want the same window...!!! regards,

Bruno Loureiro
<brunoloureiro@usa.net>
 
You cannot change the features like status bar and toolbar of already opened window.
 
Not even with IE5 ?
regards,

Bruno Loureiro
<brunoloureiro@usa.net>
 
This can be done using JavaScript. We have a dynamic resize setting for popup windows on our csFiler script (see demo on site, url in sig).

In the window there is a height/width setting for a text area within the window. Using simply math we recalculate the window size to be slightly larger than the text area.

SInce we are able to resize the window of an already existing browser instance I am sure you could toggle the visibility of the status bar.

I suggest posting the question in the JavaScript forum.

Here is a sample of the JavaScript code we use to dynamically resize the window:

Code:
ChangeSize();

function ChangeSize(){

var cols = document.form1.cols.value;
var rows = document.form1.rows.value;

var maxr = ((screen.availHeight-200)/75)*5;
var maxc = ((((screen.availWidth-200)/100)*15))/1.1;

if(rows > maxr){
rows=maxr;
}
if(cols > maxc){
cols=maxc;
}

document.form1.text.cols=cols;
document.form1.text.rows=rows;

var resizex= (100 * (document.form1.cols.value/15))+200 + (document.form1.cols.value*.75);
var resizey= (75 * (document.form1.rows.value/5))+260;

if(resizex > screen.availWidth){
resizex = screen.availWidth;
}
if(resizey > screen.availHeight){
resizey = screen.availHeight;
}

window.resizeTo(resizex,resizey);
var l = (screen.availWidth/2) - (resizex/2);
var t = (screen.availHeight/2) - (resizey/2);
window.moveTo(l,t);
» » » » » »
Mike Barone
FREE and Pro CGI/Perl Scripts

FREE Scripts
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top