Call javascript with table cell dimensions

Discussion in 'ASP .Net' started by AAaron123, Jul 31, 2008.

  1. AAaron123

    AAaron123 Guest

    I have an image inside a table cell.

    I'd like to scale the image to fill the cell.

    I have a javascript routine that can change the image's height but can't
    seem to fine a place to call it with the cell dimensions not equal to zero.

    Got any ideas where?


    Thanks
     
    AAaron123, Jul 31, 2008
    #1
    1. Advertising

  2. Why don't you just specify the height in percentage?

    If you care about different browsers, you may want to test it to see if all
    of them handle image percentage height in the same way.

    --
    Eliyahu Goldin,
    Software Developer
    Microsoft MVP [ASP.NET]
    http://msmvps.com/blogs/egoldin
    http://usableasp.net


    "AAaron123" <> wrote in message
    news:...
    >I have an image inside a table cell.
    >
    > I'd like to scale the image to fill the cell.
    >
    > I have a javascript routine that can change the image's height but can't
    > seem to fine a place to call it with the cell dimensions not equal to
    > zero.
    >
    > Got any ideas where?
    >
    >
    > Thanks
    >
    >
     
    Eliyahu Goldin, Jul 31, 2008
    #2
    1. Advertising

  3. AAaron123

    AAaron123 Guest

    It may be the width that should determine the size (or maybe the height).

    But more importantly: As you may have guessed, I'm new at web development. I
    wanted to try some javascript. I tried calling it in the onload event of the
    image and other places but the cell sizes are always zero. (used debugger so
    that I could check the values)

    thanks



    "Eliyahu Goldin" <> wrote in
    message news:...
    > Why don't you just specify the height in percentage?
    >
    > If you care about different browsers, you may want to test it to see if
    > all of them handle image percentage height in the same way.
    >
    > --
    > Eliyahu Goldin,
    > Software Developer
    > Microsoft MVP [ASP.NET]
    > http://msmvps.com/blogs/egoldin
    > http://usableasp.net
    >
    >
    > "AAaron123" <> wrote in message
    > news:...
    >>I have an image inside a table cell.
    >>
    >> I'd like to scale the image to fill the cell.
    >>
    >> I have a javascript routine that can change the image's height but can't
    >> seem to fine a place to call it with the cell dimensions not equal to
    >> zero.
    >>
    >> Got any ideas where?
    >>
    >>
    >> Thanks
    >>
    >>

    >
    >
     
    AAaron123, Jul 31, 2008
    #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. Phillip Roncoroni
    Replies:
    14
    Views:
    1,101
    Toby A Inkster
    Apr 5, 2004
  2. Randell D.

    Can javascript give me image dimensions?

    Randell D., Sep 25, 2003, in forum: Javascript
    Replies:
    1
    Views:
    109
    Randell D.
    Sep 26, 2003
  3. murrayatuptowngallery

    html table dynamic dimensions that track a for loop

    murrayatuptowngallery, Nov 17, 2005, in forum: Javascript
    Replies:
    7
    Views:
    144
    Dr John Stockton
    Nov 20, 2005
  4. awoodgate
    Replies:
    2
    Views:
    78
    awoodgate
    Dec 10, 2005
  5. Dirglemore
    Replies:
    12
    Views:
    217
    David Mark
    Aug 8, 2007
Loading...

Share This Page