enlarging picture

Discussion in 'HTML' started by Derek, Sep 3, 2003.

  1. Derek

    Derek Guest

    I'm new at this. I have a webpage with a few pictures on it. This is what
    I want to accomplish. When you view a picture on my webpage I want to be
    able to click on the picture and then another window opens and the picture
    becomes much larger. For some reason right now when I click on my picture
    it does not open another window and the picture does not get bigger.

    What is the code to accomplish this. Visit my site at
    http://members.rogers.com/derek1 and take a look at my code.

    reply to newsgroup only.

    Thank you in advance.
    Derek, Sep 3, 2003
    #1
    1. Advertising

  2. Derek

    Nico Schuyt Guest

    Derek wrote:
    > For some reason right now
    > when I click on my picture it does not open another window and the
    > picture does not get bigger.
    > What is the code to accomplish this. Visit my site at
    > http://members.rogers.com/derek1 and take a look at my code.


    In your links you point to files on your local PC:
    <a href="http://members.rogers.com/derek1"><img src="c://wedding
    homepage/029.jpg" width="400" height="350"></a>
    <img src="file:///E:/001.jpg" width="600" height="364">
    <img src="file:///E:/002.jpg" width="546" height="1106">

    That doesn't work of course :)
    Change in <mg src="029.jpg" ....> etc
    Next problem: The 029.jpg has a size of about 1.6 MB! That's far too much.
    Make the picture smaller (in a picture editor, *not* in HTML) and compress
    the jpeg to reduce the size.
    Regards, Nico
    Nico Schuyt, Sep 3, 2003
    #2
    1. Advertising

  3. Derek

    Leslie Guest

    On Wed, 03 Sep 2003 04:05:19 GMT, "Derek" <>
    wrote:

    >I'm new at this. I have a webpage with a few pictures on it. This is what
    >I want to accomplish. When you view a picture on my webpage I want to be
    >able to click on the picture and then another window opens and the picture
    >becomes much larger. For some reason right now when I click on my picture
    >it does not open another window and the picture does not get bigger.
    >
    >What is the code to accomplish this. Visit my site at
    >http://members.rogers.com/derek1 and take a look at my code.


    Congratulations on your wedding, Derek!

    Even on a cable modem your page took several minutes to load - too
    long. Instead of 'resizing' your pictures using the width & height
    attributes in HTML you should use a graphic editor to create thumbnail
    size pics to post on the main page.

    What works for me, in a graphic editor, is to copy of the original
    then resize it to thumbnail size, There's no hard and fast rule about
    what size a thumbnail should be, just make sure to make it small
    enough to greatly reduce the file size, but large enough to be able to
    see the details. Link the thumbnails to the larger version of the
    picture.

    You should also use the alt="" attribute in your image tags. Not only
    is that 'good' HTML, but will allow visitors to know who is in the
    pics.

    Hope this helps,

    Leslie
    Leslie, Sep 4, 2003
    #3
  4. Derek

    Nico Schuyt Guest

    Leslie wrote:
    > You should also use the alt="" attribute in your image tags. Not only
    > is that 'good' HTML, but will allow visitors to know who is in the
    > pics.


    Ehhh, that's not the intention of the alt attribute (though IE uses it for
    that purpose). It is intended as a *replacement* in case pictures are not
    available (text- or speech browsers for example).
    Better: Use title="xxxxx"
    Regards, Nico
    Nico Schuyt, Sep 4, 2003
    #4
  5. "Derek" <> wrote in
    news:3Md5b.143739$...
    > I'm new at this. I have a webpage with a few pictures on it. This is

    what
    > I want to accomplish. When you view a picture on my webpage I want to be
    > able to click on the picture and then another window opens and the picture
    > becomes much larger. For some reason right now when I click on my picture
    > it does not open another window and the picture does not get bigger.
    >
    > What is the code to accomplish this. Visit my site at
    > http://members.rogers.com/derek1 and take a look at my code.
    >
    > reply to newsgroup only.
    >
    > Thank you in advance.


    Here's the code for the link:

    <a href="javascript:;"
    onClick="window.open('pic.jpg','windowname','width=500,height=500,top=100,le
    ft=100');">
    <img src="thumbnail.gif">
    </a>

    --
    Janne
    Janne Raiskila, Sep 4, 2003
    #5
  6. Derek

    Chris Morris Guest

    "Janne Raiskila" <> writes:
    > Here's the code for the link:
    >
    > <a href="javascript:;"


    Wrong, should be.
    <a href="pic.jpg"

    > onClick="window.open('pic.jpg','windowname','width=500,height=500,top=100,le
    > ft=100');


    Changing the above needs the following adding here
    return false;

    > ">
    > <img src="thumbnail.gif">


    <img> requires an alt attribute, but this is even more important (more
    important than essential doesn't make a lot of sense, I know) since
    it's a link.

    <img src="thumbnail.gif" alt="<short description of photograph goes here>">

    > </a>


    So,
    <a href="pic.jpg" onClick="window.open('pic.jpg','windowname',
    'width=500,height=500,top=100,left=100');return false;"><img
    src="thumbnail.gif" alt="Lesser-spotted herring"></a>

    Now works and makes sense for search engines, users without
    Javascript, etc.

    --
    Chris
    Chris Morris, Sep 4, 2003
    #6
  7. Derek

    Adrienne Guest

    Gazing into my crystal ball I observed Chris Morris
    <> writing in
    news::

    >> <img src="thumbnail.gif">

    >
    ><img> requires an alt attribute, but this is even more important (more
    > important than essential doesn't make a lot of sense, I know) since
    > it's a link.
    >
    ><img src="thumbnail.gif" alt="<short description of photograph goes
    >here>">
    >


    <img src="thumbnail.gif" alt="short description of photo goes here">

    Attributes do not need < > surrounding them, unless you meant ( )

    --
    Adrienne Boswell
    Please respond to the group so others can share
    http://www.arbpen.com
    Adrienne, Sep 4, 2003
    #7
  8. "Chris Morris" <> wrote in
    news:...

    > So,
    > <a href="pic.jpg" onClick="window.open('pic.jpg','windowname',
    > 'width=500,height=500,top=100,left=100');return false;"><img
    > src="thumbnail.gif" alt="Lesser-spotted herring"></a>


    Yeah, sorry. I was type of assuming that people had Javascript enabled.

    > <img> requires an alt attribute:
    > <img src="thumbnail.gif" alt="<short description of photograph goes

    here>">

    Maybe... You also might want to add the title-attribute

    --
    Janne
    http://trax.to/thx/
    Janne Raiskila, Sep 4, 2003
    #8
  9. Chris Morris wrote:

    > <a href="pic.jpg" onClick="window.open('pic.jpg','windowname',
    > 'width=500,height=500,top=100,left=100');return false;"><img
    > src="thumbnail.gif" alt="Lesser-spotted herring"></a>


    Better:

    <a href="pic.jpg" target="windowname" onClick="window.open(this.href,
    this.target, 'width=500,height=500,top=100,left=100'); return false;"><img
    src="thumbnail.gif" alt="Lesser-spotted herring"></a>


    --
    Toby A Inkster BSc (Hons) ARCS | mailto: | pgp:0x6A2A7D39
    aim:inka80 | icq:6622880 | yahoo:tobyink | jabber:
    http://www.goddamn.co.uk/tobyink/ | "You've got spam!"
    playing://(nothing)
    Toby A Inkster, Sep 4, 2003
    #9
  10. Derek

    Chris Morris Guest

    Adrienne <> writes:
    > Gazing into my crystal ball I observed Chris Morris
    > ><img src="thumbnail.gif" alt="<short description of photograph goes
    > >here>">

    >
    > <img src="thumbnail.gif" alt="short description of photo goes here">
    >
    > Attributes do not need < > surrounding them, unless you meant ( )


    Sorry, I was trying to indicate that that text should be replaced by
    something more appropriate to the specific image. It wasn't very
    clear, was it...

    --
    Chris
    Chris Morris, Sep 5, 2003
    #10
    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. Leif K-Brooks

    Re: Enlarging images in same window

    Leif K-Brooks, Mar 4, 2004, in forum: HTML
    Replies:
    2
    Views:
    440
    Mark Parnell
    Mar 4, 2004
  2. Christofer Dutz
    Replies:
    1
    Views:
    981
    Neredbojias
    Aug 29, 2005
  3. Replies:
    0
    Views:
    329
  4. Replies:
    2
    Views:
    360
  5. Replies:
    8
    Views:
    1,218
    Mick White
    Apr 19, 2005
Loading...

Share This Page