I have hidden images in several different DIV using embedded css in my head for my html file but I want to show an specify image using Javascript. For example a pop-up will ask the user which photo will they like to see and to type in what they have choosen and only that photo will pop. So now that I have hidden my image it doesn't want to appear even tho tell it to become visible in my javascript. What am I doing wrong??? BTW the images have to be assign DIV classes. here is my code.
<html>
<head>
<style>
body{background-image:url(http://www.desktopaper.com/wp-content/uploads/simple-stars-background-by-fantmayo-dibs.jpg)
}
h1{
margin-bottom:0;
background-color:white;
height:40px;
width:200px;
}
p{
background-color:#200000;
color:white;
height:250px;
width:900px;
float:left;
}
#Uhura,#Sulu,#Scotty{
position:relative;
background-color:#6E6E6E;
height:20px;
width:300px;
margin-left:900px;
display:none;
}
</style>
</head>
<body>
<h1><pre>Title Title</pre></h1>
<p>text text</p>
<div id="Scotty">
<img src="images/scotty.jpg" alt="Scotty" width="300" height="300">
</div>
<div id="Uhura">
<img src="images/uhura.jpg" alt="Uhura" width="300" height="300">
</div>
<div id="Sulu">
<img src="images/sulu.jpg" alt="Sulu" width="300" height="300">
</div>
<script>
var choice;
do{
choice = window.prompt("Which of these Star Trek members wil you like to see?Enter S for Scotty, U for Uhura, or L for Sulu");
choice = choice.toUpperCase();
} while (choice != 'S' && choice != 'U' && choice !='L');
var member;
if(choice == 'S'){
member = "Scotty";
document.getELementById("Scotty").style.visibility='visible';
}else if(choice == "U"){
member = "Uhura";
document.getELementById("Uhura").style.visibility='visible';
}else{
member= "Sulu";
document.getELementById("Sulu").style.visibility='visible';
}
</script>
</body>
</html>