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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

detect action in IE ...

Status
Not open for further replies.

tyris

Programmer
Nov 2, 2000
311
FR
is there a way to detect a change in the toolbar ?
i mean, i have a window that is 350x500.
i need the page to be centered, so that the person don't need the scroll bar...
when the person changes the toolbar, i can become more large, so that my page is no more centered ...
is there a way to detect this in order to give back to my window the good size ?

thanks

Best regards,
Elise
 
Sounds like there's a few ways to get what you want.

1. Open a window to a specific size:

subWindow = window.open("mypage.html","myWindow","height=350, width=500")

This will get rid of all toolbars straight away.

2. If you've got absolutely positioned elements, use the onResize=myFunction() handler.

3. If you just want a totally centered page, you don't need javascript at all - this will remain centered through any window resizes etc..

<body>
<center>
<table width=&quot;100%&quot; height=&quot;100%&quot;><tr><td>
<div align=&quot;center&quot;>My Page</div>
</td></tr></table>
</center>
</body>

Hope something there helps..

Matt.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top