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'].s tyle.displ ay = "none"
Sample B:
Javascript code succeeds:
var postable = GetElement("tblpos")
postable.rows[1].style.dis play = "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>
Sample A: Javascript code errs:
var postable = GetElement("tblpos")
postable.rows['funding'].s
Sample B:
Javascript code succeeds:
var postable = GetElement("tblpos")
postable.rows[1].style.dis
<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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.