Accessing value of hidden table cell

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

    Accessing value of hidden table cell

    I've created an ASP table which is dynamically populated and it has a hidden
    column at the end. The cell is marked as invisible but when I try and obtain
    the cell value in client side script (JavaScript) then the cell does not
    exist in the row's Cells collection. If I flag the cell as visible on
    creation then the cell value can be accessed by the client side script.

    Can someone help me out?


  • =?Utf-8?B?YnJ1Y2UgYmFya2Vy?=

    #2
    RE: Accessing value of hidden table cell

    any control set to invisible is not rendered, so can not be accessed by
    client script. you can set the style, but hidden fields seem like a better
    idea.

    -- bruce (sqlwork.com)


    "chris" wrote:
    I've created an ASP table which is dynamically populated and it has a hidden
    column at the end. The cell is marked as invisible but when I try and obtain
    the cell value in client side script (JavaScript) then the cell does not
    exist in the row's Cells collection. If I flag the cell as visible on
    creation then the cell value can be accessed by the client side script.
    >
    Can someone help me out?
    >
    >
    >

    Comment

    • Eliyahu Goldin

      #3
      Re: Accessing value of hidden table cell

      For the reason Bruce's said, leave the column with Visible = true and hide
      it with css rule display:none. You can do it by assignid the column's
      CssClass="Invis ible" where Invisible is defined somewhere in css as
      ..Invisible{dis pley:none}

      --
      Eliyahu Goldin,
      Software Developer
      Microsoft MVP [ASP.NET]




      "bruce barker" <brucebarker@di scussions.micro soft.comwrote in message
      news:BDACD15D-B33E-4AAE-9A33-3E29D26CD65F@mi crosoft.com...
      any control set to invisible is not rendered, so can not be accessed by
      client script. you can set the style, but hidden fields seem like a better
      idea.
      >
      -- bruce (sqlwork.com)
      >
      >
      "chris" wrote:
      >
      >I've created an ASP table which is dynamically populated and it has a
      >hidden
      >column at the end. The cell is marked as invisible but when I try and
      >obtain
      >the cell value in client side script (JavaScript) then the cell does not
      >exist in the row's Cells collection. If I flag the cell as visible on
      >creation then the cell value can be accessed by the client side script.
      >>
      >Can someone help me out?
      >>
      >>
      >>

      Comment

      Working...