[Javascript] strange things in javascript world

anand anandkan at vsnl.net
Thu Aug 8 21:02:26 CDT 2002


hi

pl change "=="  in the for loop with "=" ie
j==stPoglavi to j=stPoglavi.

for checkbox on/off

use  

document.formname.elementname[index].checked=true (or false)

HTH

mohan

 Hi!
 
 Some strange things are going on in javascript world...... :(
 I have this function:
 
 function vnos(id) {
  for (var j = 1; j == stPoglavij; j++) {
 
   var temp1 = 'arrayPoglavja'+j;
    temp1 = eval(temp1);
 
   temp1 = temp1[0].indexOf(id,1);
 
   if (temp1 != '-1') {
   document.forms["Forma"].elements["poglavje"+id].value = 'on';
   }
 }
 }
 
 And javascript wont and wont go into this for loop. WHY THE HELL NOT? :(
 One more thing....what is the correct expression to turn on the checkbox
 (bellow)?
 
 document.forms["Forma"].elements["poglavje"].value = 'on'
 
 Please help me!
 
 Bye,
 
 Iztok
 

_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
https://lists.LaTech.edu/mailman/listinfo/javascript




More information about the Javascript mailing list