Hey Guys,
I was wondering if anyone could solve the issue I am currently having.
I am attempting to create a text box using innerHTML between div tags when the value of a scroll down box is 0.
Here stands my code:
Code:
<select name="destination" onchange="dest(document.signoutForm.destination.options[document.signoutForm.destination.selectedIndex].value);">
Code:
function dest(destination){
if(destination == 0){document.getElementById("demo").innerHTML="<input type=\"text\" name=\"dest\" />";
}else {
document.getElementById("demo").innerHTML=" ";
}
}
I have attempted changing the function which calls the method (i.e. to onclick, onkeyup, etc.) but alas, no success.
The textbox is created when the destination is == 0 however once the function has been called and the text box been created, the function is not called again (I have tested this with various alert message placed throughout the code).
Anyone have any idea what I can do to solve the issue.
Thanks
SACoder