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
[SOLVED] - Table attribute variable
Moderator: General Moderators
[SOLVED] - Table attribute variable
Last edited by anjanesh on Mon May 09, 2005 10:35 am, edited 1 time in total.
I guess you could use title for that. http://www.w3.org/TR/html4/struct/globa ... adef-title
Ah..yes - thats a good one - thanks - wouldnt mind showing the title when a user moves the moves over the progress bar.
BTW, in IE if I just add some attribute like <table currentPos="0"> I can actually access currentPos in Javascript !!! If this had worked in FireFox and others then this would have been really cool ! - User-defined attributes !
BTW, in IE if I just add some attribute like <table currentPos="0"> I can actually access currentPos in Javascript !!! If this had worked in FireFox and others then this would have been really cool ! - User-defined attributes !