View Full Version : Dynamicly autonaming tables in a loop?? SOLVED

03-18-2006, 11:29 PM

I have a onMouseOver script that "highlights" a whole column when the mousepointer is over the top row columns. My problem is that when I have
more than one table looped out from the database the script "highlights" all
the tables column "X", I just want it to "highlight" the column in the table i am
onMouseOver in. My guess isthat I somehow needs to name all tables? If so, how do I do it?

I hope I explained it so you understand ;)


03-20-2006, 06:24 PM
Why not post your solution?

03-20-2006, 11:32 PM
Ok sorry for not giving away the answer when I solved it but here it comes:

To dynamicly name a table i wrote the table tag like this:

<table id="table_<%=objrs("ID")%>" ...

and in the db Ihavea field named ID which is set to counter.

And when I tested this I had 2 tables in my DB and they got named
table_1 & table_13 this because in my first table I had 12 rows.

Hope that explains it for you :D