Closed Thread Icon

Topic awaiting preservation: I checked that the checkbox is checked but it keeps unchecking the checked checkbox (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=8315" title="Pages that link to Topic awaiting preservation: I checked that the checkbox is checked but it keeps unchecking the checked checkbox (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: I checked that the checkbox is checked but it keeps unchecking the checked checkbox <span class="small">(Page 1 of 1)</span>\

 
Petskull
Maniac (V) Mad Scientist

From: 127 Halcyon Road, Marenia, Atlantis
Insane since: Aug 2000

posted posted 09-18-2002 17:57

Doesn't work...

I think that 'window[checkblock] == true' never returns true.. why?

code:
function writeClient(cell){
checkblock = "document.forms.survey.choose_"+cell+".checked";
insidecell = cell + "_cell";
thecell = cell;
window.status = window[checkblock] +" "+ checkblock +" "+ insidecell;
if (window[checkblock] == true){
document.getElementById(insidecell).innerHTML = window[insidecell];
} else {
document.getElementById(insidecell).innerHTML = "";
}
}




Code - CGI - links - DHTML - Javascript - Perl - programming - Magic - http://www.twistedport.com
ICQ: 67751342

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 09-18-2002 18:03

Ooh. Unfortunately, while you can do this

object["property"]

you can't do this

object["childobject.property"]

it just doesn't work. So I suggest you change the checkblock assignment to

checkblock = document.forms.survey["choose_"+cell].checked;

And then you can replace occurances of window[checkblock] with just checkblock. Your window.status line may need to be changed.

Oh, and btw: if (something == true) is the same as just if(something). Both are the same as if(((something == true) == true) == true). All the if statement needs is for whatever's inside it to be equal to true, so there's no need to explicitly compare it to the true value.

« BackwardsOnwards »

Show Forum Drop Down Menu