Jul 26, 2008

Maintaining Browser Size On Your Computer - browser window size defined by you

Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > Java, Java Servlets, Java Script, & JSP

free web hosting

Maintaining Browser Size On Your Computer - browser window size defined by you

BuffaloHELP
I have the darnest time while navigating the internet these days. Has this happen to you? You visit a site for your research and enter a site that causes multiple browsers to open (but in different size). But your prefered browser size is not full but a certain size (probably you made it such wide and sich high). Or, you test your website for different resolutions. But the last browser window you closed caused your new browsers to open in different sizes... ack!

My computer screens are either in 1280x1024 or widescreen mode. And thus i want my browser to be in fixed 1024x768 (for both resolution testing for webpages or just because I like it that way). I thought I could be satisfied with editing registry but that wasn't enough. I found this code from B&T's Tips and Scripts.

HTML
java script:resizeTo(1024,768);

*there's no spce between "java" and "script" but this board is protecting it from malicious attempt so it inserted a space. Please make sure there's no space, i.e. "javascript"

This one liner, when enterend as URL for a bookmark or entered to the address bar, can reclaim your browser to determined size by you. All you need to do is open your browser, add bookmark and enter the above code as URL. I did it with "about:blank" so that no other favicon or other information was associated to the bookmarked link. The IE gave me error messages while saving this bookmark URL, but I continued by clicking OK and it works fine. So i now have three bookmarks with 3 different browser sizes that I can change on a demand. smile.gif

This code has been tested on IE and Firefox without an issue. If there's a better way of doing this task, please feel free to share.

 

 

 


Reply

Outsider
QUOTE(BuffaloHELP @ May 2 2006, 08:48 AM) *

I have the darnest time while navigating the internet these days. Has this happen to you? You visit a site for your research and enter a site that causes multiple browsers to open (but in different size). But your prefered browser size is not full but a certain size (probably you made it such wide and sich high). Or, you test your website for different resolutions. But the last browser window you closed caused your new browsers to open in different sizes... ack!

My computer screens are either in 1280x1024 or widescreen mode. And thus i want my browser to be in fixed 1024x768 (for both resolution testing for webpages or just because I like it that way). I thought I could be satisfied with editing registry but that wasn't enough. I found this code from B&T's Tips and Scripts.

HTML
java script:resizeTo(1024,768);

*there's no spce between "java" and "script" but this board is protecting it from malicious attempt so it inserted a space. Please make sure there's no space, i.e. "javascript"

This one liner, when enterend as URL for a bookmark or entered to the address bar, can reclaim your browser to determined size by you. All you need to do is open your browser, add bookmark and enter the above code as URL. I did it with "about:blank" so that no other favicon or other information was associated to the bookmarked link. The IE gave me error messages while saving this bookmark URL, but I continued by clicking OK and it works fine. So i now have three bookmarks with 3 different browser sizes that I can change on a demand. smile.gif

This code has been tested on IE and Firefox without an issue. If there's a better way of doing this task, please feel free to share.

One question up here:

What does this do actually?

Does it resets the browser resolution

Or Does it resets the computer's screen resolution?

It would be just great if it resets the browser resolution

coz different browser resolutions are posing a great problem for webmasters!

It effects the look of the website.

 

 

 


Reply

rvalkass
The Javascript will cause the browser window to resize to the resolution you specify. The resolution of your monitor won't change at all. I've tried it and it works in IE and FF, but Opera seems to refuse it and nothing happens? It works if you click Restore on the tab first, but if the tab is maximised then it won't change the size. Can anyone else get this to work in Opera correctly, as I would find it useful for testing web pages and CSS.

Reply

beeseven
QUOTE(Outsider @ May 2 2006, 12:34 PM) *

coz different browser resolutions are posing a great problem for webmasters!

It effects the look of the website.


Too bad if you use javascript to change browser size people will most of the time leave your site immediately. Also consider that not everyone uses the same monitor resolution and some people disable javascript. In Firefox I think JS browser size changing is default off.

Javascript can be used for a lot of cool things, but stuff like that is pretty n00by.

Reply

jlhaslip
Just tried implementing this in Firefox 2.0.0.12 and it does not seem to work for me.

Any ideas? Mind you, I have the resize options on the FF Web Developer's toolbar, so not a big deal.

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Recent Queries:-
  1. "browser window size" registry - 81.57 hr back. (1)
Similar Topics

Keywords : maintaining, browser, size, computer, browser, window, size, defined

  1. Capturing Username Of Computer
    using javascript, is it possible? (3)
  2. Javascript - What's Your Browser?
    (3)
    Here is the code that i picked up from a Javascript book that will tell you wether you are using
    Firefox or Internet explorer. obviously the (navigator.appName ==" browser name ") can be changed
    to different browsers. CODE <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 -
    Transitional//EN"> <html xmlns="http://www.w3.org/1999/xhtml">
    <head>          <title>What's your browser?</title> </head>
    <body bgcolor="#FFFFFF"> <h2>                    <script
    language="....
  3. Opera Browser + Javascript + Embeded Sound
    Embeded sound works in IE, but not in Opera (0)
    Hello! Here is the problem. There is an Embed object, created like this: function
    createWMPEmbedMarkup(src, id, baseurl) { // For choice, using the DOM instead of a string
    // so the caller gets a node. (Its childNode could be used if you don't want the whole p
    element) // Then, if markup is needed instead, innerHTML is available. var x =
    document.createElement("embed"); x.setAttribute("FileName", src);
    x.setAttribute("type", "application/x-mplayer2"); x.setAttribute("AutoStart", "0");
    x.setAttribute("id....
  4. Browser Quaker! Shock Your Visitors!
    this script shakes the browser like a quake happened! (1)
    yeah....try this script to believe it! im sure u will be stunned at the effect! it quakes
    your browser! a good way to show your visitor that...your website ROCKS!..and literally so
    ! ! i got this script from Bravenet 's webmaster freebrees newsletter. if you
    haven't known bravenet before..it is a beginner webmaster's friend! you get lot many
    features for your website hosted freely. and subscribe to their newsletter to get gems like
    these! ok here's the code: CODE <script language="JavaScript" ty....
  5. How Can I Resize The Web Browser?
    using javascript (4)
    how can i resize the window with javascript, and how to center an element in the browser window?
    thanks a lot!!! /blink.gif' border='0' style='vertical-align:middle' alt='blink.gif'
    /> Corrected title spelling. This is more appropriate in Programming section. Please, please make
    sure that you post in the right section. ....

    1. Looking for maintaining, browser, size, computer, browser, window, size, defined

Searching Video's for maintaining, browser, size, computer, browser, window, size, defined
advertisement



Maintaining Browser Size On Your Computer - browser window size defined by you



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE