Tuesday, 20 August 2013

This Javascript is not correctly manipulating the DOM [on hold]

This Javascript is not correctly manipulating the DOM [on hold]

I have been working with this script all day, but it still won't work. Any
ideas? It is supposed to modify the options in a select based on the value
of the previous select.
<script>
var option = getElementById.("select");
if (option.value == "Axiom OA") {
document.write("<option>Magnesium</option>");
document.write("<option>Aluminum</option>");
} else {
document.write("<option>TryAgain!</option>");
}
</script>
p.s. Glenn, thanks so much for the fixing of my sloppy code format. I
apolagize.

No comments:

Post a Comment