homepage Welcome to WebmasterWorld Guest from 54.167.185.110
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
Controlling Appearance of Window
pixelrat




msg:1477005
 6:39 pm on Apr 24, 2003 (gmt 0)

I want to be able to control the appearance of a window ie:
scrollbars, location, resize etc.

But I want to do this from within the page itself, as with eg. window maximise scripts.

All I can find are scripts for doing this by opening from another page.

Can anyone help?

 

ShawnR




msg:1477006
 10:41 pm on Apr 24, 2003 (gmt 0)

It is not posible to controll all the attributes, but you can control some. For example, you can position on the screen by accessing the DOM using javascript. For example:

window.resizeTo(window.screen.availWidth/2);
window.screen.left = 1;
window.resizeTo( window.screen.availHeight/4 );
window.screen.top = 0;

See [webmasterworld.com...] for further discussion on posssible cludges.

Shawn

pixelrat




msg:1477007
 7:38 am on Apr 25, 2003 (gmt 0)

Looks like a good cludge would be to have a new window pop up another window, then close itself.

Where can I find a script to do this?

ShawnR




msg:1477008
 8:32 am on Apr 25, 2003 (gmt 0)

A quick and dirty is:

onload="javascript:window.open('url_of_new_window.html','WindowName','menubar=no,toolbar=no,status=no,width=100,height=100,resizable=yes,scrollbars=yes'); window.close()"

(I think that should work, haven't tested.)

However, do you really need to? It will look pretty clunky, and if you don't need to remove the toolbars, status bars, and scroll-bars then you should be able to do the rest without closing the window. Personally, I think its pretty condescending to your website visitors to remove the status bars & toolbars; and removing the scroll bars makes it difficult for people with small screens (such as on a PDA) to view your site. So have a think about whether you really need it or not...

Shawn

grahamstewart




msg:1477009
 8:46 am on Apr 25, 2003 (gmt 0)

I agree with ShawnR, I really hate it when a website takes away my menubar and toolbar.
I can't think of any good reason to do it.

I'm quite capable of making my browser full screen myself if I have to. :)

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved