Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Define Page Properties
Old 07-24-2007, 07:48 AM Define Page Properties
Spud In Disguise's Avatar
Super Spam Talker

Posts: 808
Location: UK... where else?
Trades: 0
Hey, is it possible to define the properties of a page within the actual page.

To elaborate, I want to link to a page, with a normal link and then for the page that is loaded to resize - but all the info (properties) to be contained within the new page...

Is this achievable?

Cheers
Spud In Disguise is offline
Reply With Quote
View Public Profile Visit Spud In Disguise's homepage!
 
 
Register now for full access!
Old 07-24-2007, 07:22 PM Re: Define Page Properties
Oneway's Avatar
Skilled Talker

Posts: 71
Trades: 0
If you're asking wether it's possible to use a script in the new page and have that script resize the browser, then yes, it is possible (if the user has allowed this behaviour from javascript).

You're looking for
Code:
window.resizeTo(x,y)
where x and y are the new width and height of the browser window respectively.

Check out this link for some more info.
http://www.quirksmode.org/js/winprop.html
Oneway is offline
Reply With Quote
View Public Profile
 
Old 08-01-2007, 05:55 PM Re: Define Page Properties
Spud In Disguise's Avatar
Super Spam Talker

Posts: 808
Location: UK... where else?
Trades: 0
I see, so how would I place this in the page? Simply in the < JavaScript > tags?
Spud In Disguise is offline
Reply With Quote
View Public Profile Visit Spud In Disguise's homepage!
 
Old 08-02-2007, 12:08 AM Re: Define Page Properties
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,938
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
Trades: 0
You'd create a function for it and call it in the onload attribute of the body tag.

Something like this:
Code:
function resizeTheWindow() {
     window.resizeTo(width,height);
}
...
Code:
<body onload="resizeTheWindow();">
Mind you, this is never a good idea...resizing the user's browser window is an affront to usability, especially on page load.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
(my blog)


Please login or register to view this content. Registration is FREE
(with proof)
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Old 08-02-2007, 02:26 AM Re: Define Page Properties
ForrestCroce's Avatar
Half Man, Half Amazing

Posts: 3,023
Name: Forrest Croce
Location: Seattle, WA
Trades: 0
If you really need to display a page at a certain size, instead link to a js function that will throw up a pop-up at that size.

<a href="javascript:ThrowPopup()" />

Click the attachment; this is part of the FireFox options. The default is to let page code change the browser size, but it's pretty easy to make sure that doesn't happen. I have my browser in the size and position I want it ... if a site ****s with that, I leave and don't come back.
Attached Images
File Type: jpg JS.jpg (12.0 KB, 1 views)
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

Last edited by ForrestCroce; 08-02-2007 at 02:28 AM..
ForrestCroce is offline
Reply With Quote
View Public Profile Visit ForrestCroce's homepage!
 
Reply     « Reply to Define Page Properties
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.83581 seconds with 13 queries