Show/hide table rows -- parameter undefined error?

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

    Show/hide table rows -- parameter undefined error?

    Hi, I'm trying to get the following script to work, but I'm getting an
    error saying "rowID is undefined".

    function showhide(rowId) {
    var showRow = "Edit_" + rowID
    var hideRow = "View_" + rowID
    document.getEle mentById(showRo w).style.displa y ="block";
    document.getEle mentById(hideRo w).style.displa y = "none";
    }

    I'm building the html using an xsl stylesheet, so I'm passing a
    dynamic name attribute as the rowID parameter. When I look at the HTML
    source, it looks fine. Please tell me where I'm going wrong...I'm sure
    it's simple, just not to me! Thanks, Kathy

    Here is a sample of the row source:

    <tr id="View_Label " bgcolor="red" valign="middle"
    style="display: block">
    <td width="70%"><h3 >1. Label</h3></td>
    <td width="30%">
    <input type="button" name="Edit" value="Edit"
    onclick="showhi de('Label')"></td>
    </tr>

    ....then another row with ="Edit_Label " is used for the input boxes,
    etc.
  • kaeli

    #2
    Re: Show/hide table rows -- parameter undefined error?

    In article <75e8d381.03092 90734.2609f3c7@ posting.google. com>,
    KathyBurke40@at tbi.com enlightened us with...[color=blue]
    > Hi, I'm trying to get the following script to work, but I'm getting an
    > error saying "rowID is undefined".
    >[/color]

    Case-sensitive.
    [color=blue]
    > function showhide(rowId) {
    > var showRow = "Edit_" + rowID <-- rowId not rowID[/color]

    -------------------------------------------------
    ~kaeli~
    All I ask for is the chance to prove that money
    cannot make me happy.


    -------------------------------------------------

    Comment

    • Kathy Burke

      #3
      Re: Show/hide table rows -- parameter undefined error?

      ugh. can't believe I didn't see that. thanks!

      Kathy

      *** Sent via Developersdex http://www.developersdex.com ***
      Don't just participate in USENET...get rewarded for it!

      Comment

      Working...