[SOLVED] - Table attribute variable
Posted: Sun May 08, 2005 2:37 am
I have 2 <table>s.
Each of these tables is actually a progress bar status - like the windows type.
progress1
progress2
Both gets updated - when progress2 finishes, progress1 gets incremented by 1 and progress2 restarts....goes on until progress1 finishes.
Problem is I need separate counters to keep track of completion status for each table - Im setting the <td> colour value.
Instead of checking each one for where the colour is white so as to add from there on - these counters is a lot faster.
Is there any way for me to have some attribute in the table that I can use as a counter - I dont want to use separate JS variable for each bar.
Something like <table id="Bar1" sometagvalue="0">
so that I can do document.getElementById("Bar1").sometagvalue = "2";
Thanks
Each of these tables is actually a progress bar status - like the windows type.
progress1
progress2
Both gets updated - when progress2 finishes, progress1 gets incremented by 1 and progress2 restarts....goes on until progress1 finishes.
Problem is I need separate counters to keep track of completion status for each table - Im setting the <td> colour value.
Instead of checking each one for where the colour is white so as to add from there on - these counters is a lot faster.
Is there any way for me to have some attribute in the table that I can use as a counter - I dont want to use separate JS variable for each bar.
Something like <table id="Bar1" sometagvalue="0">
so that I can do document.getElementById("Bar1").sometagvalue = "2";
Thanks