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

Sizing a Web Page from Within

Status
Not open for further replies.

RoguePoet01

Programmer
Oct 1, 2003
302
US
Hello,

I found a neat little javascript that sizes a popup window according to certain specs, but it only works from the window making the call.

I'd like to let people link to one of my pages, but it looks best when it opens at 500x500.

How do I make it open at that size from within, so that it opens that way no matter where the link comes from.

Thanks.
 
You can use javascript to perform this action:

Code:
<body onLoad="window.resizeTo([blue]<width>[/blue], [blue]<height>[/blue]);">
Replace the <width> and <height> tags with the actual width and height.

However, I must caution you about doing this. You'll alienate many of your users if you do this. My suggestion would be to put the text "This page is best viewed in 500 by 500".

Good luck,
-Ron

We all play from the same deck of cards, it's how we play the hand we are dealt which makes us who we are. -Me

murof siht edisni kcuts m'I - PLEH
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top