[Javascript] Eval() question
Yann.DeChamplain at molson.com
Yann.DeChamplain at molson.com
Thu Jun 13 08:07:42 CDT 2002
I'm trying now to create variable in a for loop and I got an error:
I tested some ways and I got something like "impossible to assign a value to
a funtion".
These functions work on the style of a <table> (TR). After I change the
display style option I can't correctly reevaluate the new value in the style
property of the TR id so I wanna create a status variable for each row in
the table to set a status.
var curNum;
var maxcurNum;
curNum = 2;
maxcurNum = 12
for(var count = curNum; count <= maxcurNum; count++){
-----------------------> eval("status" + count) = "none";
}
function addr(){
while(curNum <= maxcurNum){
rid = "r" + curNum;
sid = "status" + curNum;
if(eval(sid) = "none"){
eval(daid).style.display = "Block";
eval(sid) = "Block";
//alert('i found a "none" value at id:' +
daid);
return true;
break;
}
curNum++;
alert(curNum++);
}
curNum = 2; //back to initial value after exit from while
loop.
}
Bye!
Yann de Champlain
Consultant Web Senior
Molson Canada
Tél (514) 521-1786 Ext: 5041
Fax (514) 598-6923
Internet Yann.deChamplain at Molson.com <mailto:Yann.deChamplain at Molson.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20020613/d86b6ae1/attachment.htm>
More information about the Javascript
mailing list