Nagnag
09-01-2006, 07:58 AM
function revealcontrol(){
var txt = document.getElementById('textbox1');
if(txt='1'){revealit1()}
else if(txt='2'){revealit2()}
else if(txt='3'){revealit3()}
else alert('test')
}
I'm not sure what I'm doing wrong, but it's not working. What I want it to do is when my textbox1.value = '1' have it call a certain function. It doesn't have to be a textbox, it can be anything that presets a value, like a listbox or whatever. This value will be set by something previously in my script, but I just can't get THIS part to work =/
var txt = document.getElementById('textbox1');
if(txt='1'){revealit1()}
else if(txt='2'){revealit2()}
else if(txt='3'){revealit3()}
else alert('test')
}
I'm not sure what I'm doing wrong, but it's not working. What I want it to do is when my textbox1.value = '1' have it call a certain function. It doesn't have to be a textbox, it can be anything that presets a value, like a listbox or whatever. This value will be set by something previously in my script, but I just can't get THIS part to work =/