Call javascript with table cell dimensions

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • AAaron123

    Call javascript with table cell dimensions

    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

    #2
    Re: Call javascript with table cell dimensions

    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]




    "AAaron123" <aaaron123@road runner.comwrote in message
    news:eXWyU6q8IH A.3648@TK2MSFTN GP03.phx.gbl...
    >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
    >
    >

    Comment

    • AAaron123

      #3
      Re: Call javascript with table cell dimensions

      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" <REMOVEALLCAPIT ALSeEgGoldDinN@ mMvVpPsS.orgwro te in
      message news:OAzaGEv8IH A.4184@TK2MSFTN GP03.phx.gbl...
      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]


      >
      >
      "AAaron123" <aaaron123@road runner.comwrote in message
      news:eXWyU6q8IH A.3648@TK2MSFTN GP03.phx.gbl...
      >>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
      >>
      >>
      >
      >

      Comment

      Working...