homepage Welcome to WebmasterWorld Guest from 50.17.176.149
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Accredited PayPal World Seller

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

JavaScript and AJAX Forum

    
Browser size
Is there a way of fixing the browser size
smokeyb




msg:1472038
 10:18 am on May 21, 2003 (gmt 0)

Is there a way of fixing the browser size when the wepage spawns? I want to create 2 sites (800x600 and 1024x768)and disallow the user from resizing the browser (They would of been linked accordingly beforehand). To make it even more difficult I also want to use frames. Can any advise on this issue?
Thanks
Smokey B

 

Mike12345




msg:1472039
 10:27 am on May 21, 2003 (gmt 0)

<body onload="window.resizeTo(800,600);"> or

Link into the win with

<a href="#" onClick="MM_openBrWindow('mypage.html','title','status=yes,scrollbars=yes,resizable=no,width=800,height=600')" STYLE="TEXT-DECORATION: NONE"></a>

pop tha script in aswell

<script language="JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) {
window.open(theURL,winName,features);
}
//-->
</script>

limbo




msg:1472040
 10:47 am on May 21, 2003 (gmt 0)

Mike12345 is absoloutley right....

But

I wonder why you would want to stop a user being able to resize the browser. Many users do not like this and it may discourage them. particularly if the resize=no command is in place - It can feel like the browsr is frozen to unintiated users and popups can be disabled easily in many browsers.

I am not going to start the resolution debate, but it may be something for you to dabble with if you have not already experimented with it. Try using a mixture of fixed and liquid layout to 'stretch and sqeeze' for different user resolutions. This has infinitely more impact than fixed pages, IMHO.

smokeyb




msg:1472041
 11:09 am on May 21, 2003 (gmt 0)

Hi,
The reason I need this is: I am going to build the webpage in Photoshop and Imageready (sliced) and there would be no problem if I were to just have an editable region that changed, I could simply insert it all in a centered table (making it comp with 800x600 upwards). Problem is that instead of that I am going to create 3 images and use them in a frameset with a nested frame. I can make a bar to the specific width and height somewhere to force the size to remain that W/H but I'd rather have the size predetermined and set, therefore people would have to maximize their browser to get rid of side scrolling. Does that make sense?
Smokey B

smokeyb




msg:1472042
 11:14 am on May 21, 2003 (gmt 0)

Sorry I meant "wouldn't"
Hi,
The reason I need this is: I am going to build the webpage in Photoshop and Imageready (sliced) and there would be no problem if I were to just have an editable region that changed, I could simply insert it all in a centered table (making it comp with 800x600 upwards). Problem is that instead of that I am going to create 3 images and use them in a frameset with a nested frame. I can make a bar to the specific width and height somewhere to force the size to remain that W/H but I'd rather have the size predetermined and set, therefore people WOULDN'T have to maximize their browser to get rid of side scrolling. Does that make sense?
Smokey B

ncsuk




msg:1472043
 11:14 am on May 21, 2003 (gmt 0)

Personally if you did that and I opened the page I would close it straight away thinking it was a popup. Be careful how you do something like this because it can be very detrimental.

smokeyb




msg:1472044
 11:22 am on May 21, 2003 (gmt 0)

Mmmmm.... "ncsuk" you make a very good point, but bear in mind that you would have been linked from a page that asked you to specify 800x600 or 1024x768 or higher, you would of been expecting something to happen. Thanks for the comments all.
Smokey B

ncsuk




msg:1472045
 11:38 am on May 21, 2003 (gmt 0)

I would expect it to appear in a maximized window with the middle but a certain size to cater for different resolutions.

Mike12345




msg:1472046
 11:59 am on May 21, 2003 (gmt 0)

I didnt get into "you shouldnt do this" or "you should do this because.." ealier, but seeing as other have done, i just want to bring to your attention limbo's point

popups can be disabled easily in many browsers.

Which may result in users not being able to to see anything and branding your site as bad :(

Its probably best that you follow ncsuk's suggestionof having it in the middle of the page.

Im only saying this now, because i feel irresponsible for telling you how to do it without fore-warning you of the possible detrimental effects.

smokeyb




msg:1472047
 1:22 pm on May 21, 2003 (gmt 0)

Ok... I'm beginning to see the error of my ways (at least some of them). The problem I have is that if I make the overall image lets say 800x600 and slice into the relative sizes for my frameset, then match it all up centered, it looks fine and with blobFisk's help with the 2 link other question, it all works swimmingly. But... if I have my browser set smaller than the image it creates a scrollbar that knocks out the alignment with the top navigation frame. I figured if I didn't allow the user to do this it would remain set out like I want. Am I being stoopid? is there a really obvious way round this problem. I will be grateful for any help with this.
Smokey B

limbo




msg:1472048
 4:23 pm on May 21, 2003 (gmt 0)

Smokey B

If I have undestood you question (sorry I can miss the t point sometimes :)) then it sounds like you could import the HTML and slices from Image ready into a table, in say, dreamweaver. Then adjust the table properties so they are fixed this will stop the knock out effect. however this will not stop the scrollbars.

smokeyb




msg:1472049
 7:24 pm on May 21, 2003 (gmt 0)

Hi limbo
I have to import them into tables anyway and I center them to line everything up as the original image. I have thought about fixing the tables positions to attempt to make them rigid, but I would go back to that old problem of different screen resolutions (borders would have to reduce/resize equally with the browser). If I make the whole thing "top,left", it should never (obviously) get out of alignment, but that would look odd in a maximized window hence the trying to preset window size. Any ideas?
Smokey B

smokeyb




msg:1472050
 7:29 pm on May 21, 2003 (gmt 0)

Thinking about it...
All I really need is for the scrollbar to appear inside the main frame, which will already be in a table and not outside on the edge of the frameset. Incidently I only wish to do this for the site I make at 800x600, the other one is the important one anyhow. Can anyone help?
Thanks

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.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved