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 4 of 4
  1. #1
    New Coder
    Join Date
    Feb 2010
    Posts
    18
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Question Opening a new window with controlled size

    I have a page with 32 different links that I'd like to open in new windows; specifically, these are image thumbnails that I'd like people to be able to click to see a larger version of the picture. Ideally, I'd be able to control the size of the new window so that it fits the pic without obscuring the main page that they're looking at. However, the only way I've found to do this requires 32 different bits of JavaScript.

    Any guidance or opinions on the pros and cons of having the smaller windows versus a mess of script? Or is there a better way to achieve the same end result?

    [Edit: And while we're at it, if "target" is deprecated, how are we supposed to do this with a strict doctype?]
    Last edited by Bedawyn; 03-30-2010 at 10:38 PM.

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,693
    Thanks
    22
    Thanked 1,831 Times in 1,815 Posts
    Hello Bedwyn,
    Have you looked at Lightbox? That's a pretty cool little photo presentation method that doesn't take the viewer away from your site. It's really easy to implement too.

    [Edit: And while we're at it, if "target" is deprecated, how are we supposed to do this with a strict doctype?]
    You're not supposed to. See http://www.trilithium.com/johan/2005/03/target-blank/ and http://www.w3.org/MarkUp/2004/xhtml-faq#target
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #3
    New Coder
    Join Date
    Feb 2010
    Posts
    18
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Thanks! I'm not sure I want to go with that; I've seen pages that (apparently) were using Lightbox before, and they've always kind of annoyed me (the whole black-out the main page, twirly wait, to see a big picture fading in thing, all taking twice the load time of a page loading in a new window). But it might be worth it for this particular site, since our visitors' goals will be a little different than my usual goals when browsing sites myself.

  • #4
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,693
    Thanks
    22
    Thanked 1,831 Times in 1,815 Posts
    Lightbox is pretty easy to configure to fit your needs...if you dig deep enough I'm sure the transitions are editable. I know the fading background is easy to change or get rid of completely.

    Maybe something like this would work for you? http://www.sohtanaka.com/web-design/...es/image-zoom/
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad


  •  

    Posting Permissions

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