Open photo in own window - no extra space around photo

Discussion in 'ASP .Net' started by RC, Nov 24, 2004.

  1. RC

    RC Guest

    I want to display photos and when the user clicks on one the photo gets
    displayed in its own window. This is what I"m currently using.

    <A id="picAnchor" target="_blank" href="../Photos/somePic.jpg"><img
    src='../Photos/ etc... </A>

    It works great - as expected the photo shows up in a new browser window. The
    thing is that I want the photo to show up in its own window - but to have
    the new window's size conform to the size of the image (i.e., no extra white
    space around the photo). Is there a way to do that without having to "know"
    ahead of time the dimensions of the pic?

    Thanks!
     
    RC, Nov 24, 2004
    #1
    1. Advertising

  2. RC

    bruce barker Guest

    load a page that references the image. with client script on the "onload()"
    event resize the window.

    -- bruce (sqlwork.com)

    "RC" <> wrote in message
    news:%23K$...
    | I want to display photos and when the user clicks on one the photo gets
    | displayed in its own window. This is what I"m currently using.
    |
    | <A id="picAnchor" target="_blank" href="../Photos/somePic.jpg"><img
    | src='../Photos/ etc... </A>
    |
    | It works great - as expected the photo shows up in a new browser window.
    The
    | thing is that I want the photo to show up in its own window - but to have
    | the new window's size conform to the size of the image (i.e., no extra
    white
    | space around the photo). Is there a way to do that without having to
    "know"
    | ahead of time the dimensions of the pic?
    |
    | Thanks!
    |
    |
     
    bruce barker, Nov 24, 2004
    #2
    1. Advertising

  3. RC

    John M Deal Guest

    Have a look at this:

    http://www.2createawebsite.com/programming/new-window.html

    This gives you the settings that allow you to set the size of a new
    browser window and load its contents.

    Also take a look at:

    http://www.javascript-coder.com/window-popup/javascript-window-open.phtml

    This will help you with turning of the toolbars and status bar if you want.

    Have A Better One!

    John M Deal, MCP
    Necessity Software

    RC wrote:
    > I want to display photos and when the user clicks on one the photo gets
    > displayed in its own window. This is what I"m currently using.
    >
    > <A id="picAnchor" target="_blank" href="../Photos/somePic.jpg"><img
    > src='../Photos/ etc... </A>
    >
    > It works great - as expected the photo shows up in a new browser window. The
    > thing is that I want the photo to show up in its own window - but to have
    > the new window's size conform to the size of the image (i.e., no extra white
    > space around the photo). Is there a way to do that without having to "know"
    > ahead of time the dimensions of the pic?
    >
    > Thanks!
    >
    >
     
    John M Deal, Nov 24, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Shuo Xiang

    Stack space, global space, heap space

    Shuo Xiang, Jul 9, 2003, in forum: C Programming
    Replies:
    10
    Views:
    2,923
    Bryan Bullard
    Jul 11, 2003
  2. Christian Seberino
    Replies:
    21
    Views:
    1,691
    Stephen Horne
    Oct 27, 2003
  3. Ian Bicking
    Replies:
    2
    Views:
    1,037
    Steve Lamb
    Oct 23, 2003
  4. Ian Bicking
    Replies:
    2
    Views:
    736
    Michael Hudson
    Oct 24, 2003
  5. =?Utf-8?B?ZHc=?=
    Replies:
    5
    Views:
    1,126
    Alan Silver
    Jul 30, 2006
Loading...

Share This Page