Link to home
Start Free TrialLog in
Avatar of KeithMcElroy
KeithMcElroy

asked on

javascript html table dom hide row by rowid

How do I get sample a to work, using the id of the row?

Sample A: Javascript code errs:
var postable = GetElement("tblpos")
postable.rows['funding'].style.display = "none"

Sample B:
Javascript code succeeds:
var postable = GetElement("tblpos")
postable.rows[1].style.display = "none"

<table id=tblpos>
<TR id="ratepayi'">
<TD class=label vAlign=top align=right>Rate of Pay $</TD>
<TR id="funding'">
<TD class=label vAlign=top align=right>Funding Source</TD></TD></TR>
</table>
ASKER CERTIFIED SOLUTION
Avatar of cy_hung
cy_hung
Flag of Hong Kong image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial