Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / HTML, CSS, Scripts / JavaScript / June 2006



Tip: Looking for answers? Try searching our database.

setting the ID for an tr-element

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Erwin Moller - 30 Jun 2006 11:37 GMT
Hi group,

This seems basic to me, but I can't find the solution.

I have a table that grows tr's and td's.
At one point I have something like this:
var new_tr = tableRef.insertRow(newRowNum);

How can I give this new tr (new_tr) an ID that can be referenced by means of
getElementById() ??

I hoped for something like:
new_tr.setID("row20");
but that doesn't fly. :-/

Thanks for your time.

Regards,
Erwin Moller
Ian Collins - 30 Jun 2006 11:47 GMT
> Hi group,
>
[quoted text clipped - 9 lines]
> I hoped for something like:
> new_tr.setID("row20");

new_tr.id = "row20";

Signature

Ian Collins.

Erwin Moller - 30 Jun 2006 11:51 GMT
>> Hi group,
>>
[quoted text clipped - 11 lines]
>
> new_tr.id = "row20";

Wow, I knew it had to be simple. :-)

Thanks for your quick response!

Regards,
Erwin Moller
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.