Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 11 of 11
  1. #1
    Regular Coder
    Join Date
    Aug 2002
    Location
    Spain
    Posts
    420
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Simulate different resolutions

    Well, this is a bookmarklet for IE that I use to see how a page works with different widths (i.e. you can simulate 1280x1024 or 640x480) without need to change resolutions or adjust window size. Not 100% accurate, but it's enough

    Code:
    javascript:db=document.body;bst=db.style.zoom=1;resdesti=prompt("Destination:",800); db.style.zoom=db.offsetWidth/resdesti;void('')
    Last edited by Borgtex; 01-16-2003 at 01:53 AM.
    Don't resist to assimilation. Billions of Borgs can't be wrong!

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    United Kingdom Confused: Often
    Posts
    859
    Thanks
    0
    Thanked 0 Times in 0 Posts
    seems to work well...

    silly question: ive been trying to work out for a long time how to add a piece of javascript to your bookmarks... can anyone tell me?    
    Last edited by redhead; 01-16-2003 at 07:33 PM.
    redhead

  • #3
    Regular Coder
    Join Date
    Aug 2002
    Location
    Spain
    Posts
    420
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by redhead
    seems to work well...

    silly question: ive been trying to work out for a long time how to add a piece of javascript to your bookmarks... can anyone tell me?    
    bookmarklets usually appear inside a link, and with the context menu it's very easy to add to favourites.

    Coding forums doesn't allows that kind of links in a post, but you can add the current page to your bookmarks, then go to properties and paste the code
    Last edited by Borgtex; 01-16-2003 at 07:43 PM.
    Don't resist to assimilation. Billions of Borgs can't be wrong!

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Location
    United Kingdom Confused: Often
    Posts
    859
    Thanks
    0
    Thanked 0 Times in 0 Posts
    heh thanks man... these things always seem so simple when someones told you the answer...
    redhead

  • #5
    Senior Coder
    Join Date
    Aug 2002
    Posts
    3,467
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I've always used this one
    Code:
    javascript:top.resizeTo(prompt("Enter new width",800),prompt("Enter new height",550));
    My Site | fValidate | My Brainbench | MSDN | Gecko | xBrowser DOM | PHP | Ars | PVP
    “Minds are like parachutes. They don't work unless they are open”
    “Maturity is simply knowing when to not be immature”

  • #6
    Senior Coder
    Join Date
    Jun 2002
    Location
    Nashua, NH
    Posts
    1,724
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Browser Sizer does the job for me...
    Vladdy | KL
    "Working web site is not the one that looks the same on common graphical browsers running on desktop computers, but the one that adequately delivers information regardless of device accessing it"

  • #7
    Senior Coder
    Join Date
    Aug 2002
    Posts
    3,467
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by Vladdy
    Browser Sizer does the job for me...
    That's pretty cool.
    My Site | fValidate | My Brainbench | MSDN | Gecko | xBrowser DOM | PHP | Ars | PVP
    “Minds are like parachutes. They don't work unless they are open”
    “Maturity is simply knowing when to not be immature”

  • #8
    New Coder
    Join Date
    Jan 2003
    Posts
    39
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Cool. How do I use it?

    OK, I feel silly, but I need to clarify what this code is for and how to use it. Are you saying that if I put this code into sites that I design the person viewing it will see the page as I intended? (In the screen resolution/browser size that I designed it to work best in?

    Pretty cool if that's the case. Now, where do I plug it in? Body? head?. . . ?

    Thanks,
    MA Funk

  • #9
    Regular Coder
    Join Date
    Aug 2002
    Location
    Spain
    Posts
    420
    Thanks
    0
    Thanked 0 Times in 0 Posts
    No, the use is for design process-only; not recommended to be used in the "real world"

    i.e:

    you want to see how a site will look with larger resolution (will it look too empty?, how will backgrunds repeat?) or a smaller one (will appear horizontal scrollbars?)

    of course, you can do something similar resizing the window to an specified size or using an external program. What I think that makes the script interesting is that you can simulate i.e. 800x1200 pixels in a window of 400x600 pixels, or 1280 width in 1024x768 resolution

    It's useful for me and maybe for anybody else, and that's why I posted it
    Don't resist to assimilation. Billions of Borgs can't be wrong!

  • #10
    Senior Coder
    Join Date
    Aug 2002
    Posts
    3,467
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Cool. How do I use it?

    Originally posted by mafunk
    OK, I feel silly, but I need to clarify what this code is for and how to use it. Are you saying that if I put this code into sites that I design the person viewing it will see the page as I intended? (In the screen resolution/browser size that I designed it to work best in?

    Pretty cool if that's the case. Now, where do I plug it in? Body? head?. . . ?

    Thanks,
    MA Funk
    No, these shouldn't be used for something like that. They are tools for developers to see what their sites in progress look like at different screen resolutions. If I'm using 1024x768 or larger, it can be difficult to know exactly how the site will look at 800x600 or whatever. And let's face it, it's a pain to have to switch your native resolution just to check on web-pages.
    My Site | fValidate | My Brainbench | MSDN | Gecko | xBrowser DOM | PHP | Ars | PVP
    “Minds are like parachutes. They don't work unless they are open”
    “Maturity is simply knowing when to not be immature”

  • #11
    jtr
    jtr is offline
    New Coder
    Join Date
    Jun 2002
    Location
    Northern California
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts
    This is a nice online tool.

    http://www.bcr.org/~msauers/restest.html


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •