internetguy
Technical User
I have a photogallery that I want to have an image and description show when I click a thumbnail. The images work, but I do not know what to do with the text. Here is my source for my main page:
and here is my javascript switch statement:
I know I have the event handler part correct, I am just unsure about the way the switch statement is done.
Code:
<textarea name="information">Information goes here</textarea>
and here is my javascript switch statement:
Code:
function descriptionChange(name){
switch(name){
case "pine":
document.getElementById("information") = document.write("Ponderosa Pine seeds are collected and identified by seed zone.");
break;
case "nursery":
document.getElementById("information") = document.write("Poderosa Pine seedlings growing at a tree nursery - We plant more than 7,000,000 trees per year.");
break;
case "thinning":
document.getElementById('information') = document.write("Pre-commercial thinning a recovering forest - 10 years after Fountain Fire in Shasta County.");
break;
case "meadow":
document.getElementById('information') = document.write("A forest meadow.");
break;
case "fuel":
document.getElementById('information') = document.write("Defensible fuel protection zone (DFPZ) or shaded fuel break.");
break;
case "lily":
document.getElementById('information') = document.write("Glacier Lily, Erythronium grandiflorum");
break;
case "height":
document.getElementById('information') = document.write("Forester measuring tree height.");
break;
case "hawk":
document.getElementById('information') = document.write("Wildlife biologist preparing to release a radio-collared Goshawk.");
break;
case "helicopter":
document.getElementById('information') = document.write("Helicopter logging.");
break;
case "station":
document.getElementById('information') = document.write("1 of 22 permanent weather station installations on SPI forest land.");
break;
case "research":
document.getElementById('information') = document.write("Research forester downloads information from a campbell weather station.");
break;
case "flow":
document.getElementById('information') = document.write("Reserch forester measuring stream flow.");
break;
default:
document.getElementById('information') = document.write("Ponderosa Pine seeds are collected and identified by seed zone.");
break;
}
}
I know I have the event handler part correct, I am just unsure about the way the switch statement is done.