...

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



Speedy
03-18-2006, 10:29 PM
Hi,

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 ;)

/Speedy

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

Speedy
03-20-2006, 10: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
/Speedy



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum