enter code here
i dunno why it gives me that error "Uncaught typeError: cannot set the property of innerHTML to undefined."
for 2 hours it was pain in the ass trying to figure out what's wrong but still didn't conclude anything....
that's my code:
if(window.addEventListener){
for(i=0; i<inArray.length; i++){
inArray[i].addEventListener('keyup',function() {
if(this.value !== '') document.body.removeChild(text[i]);
else document.body.appendChild(text[i]);
},false)
}
}else{
for(i=0; i<inArray.length; i++){
inArray[i].attachEvent('onkeyup',function() {
if(this.value !== '') document.body.removeChild(text[i]);
else document.body.appendChild(text[i]);
});
}
}