[Javascript] HELP

Dan Costea costea.dan at ssi-schaefer.ro
Fri Aug 9 00:37:13 CDT 2002


1. for checking your checkbox, use this:
document.forms["Forma"].elements["poglavje"].checked = true;

2. if you want to go in that "for" loop, your variable stPoglavij should be
set to 1. And then the "loop" will have just one step, because after the
first step j will be incremented and will be no longer equal with 1, so the
"for" condition: j == stPoglavij will be false.



----- Original Message -----
From: "Iztok Polanic" <iztokp at amis.net>
To: <javascript at LaTech.edu>
Sent: Friday, August 09, 2002 1:45 AM
Subject: [Javascript] HELP


> 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