hi folks, I would be really thankfull if someone has a script that hides and show an array of div's.
I need that to show stores in some regions, and some stores are in many regions if not all regions, so i want to filter out stores that are in a chosen region.
if i select number 2 in the drop down, i would see "blah 2" and "blah 3" and so on... Can anyone help?
Here is the code:
<html>
<head>
<script type="text/javascript">
function ShowMeWhatIWant(chosen){
if (chosen = 1) {
// show div 1
// hide div 2 and 3
}
elseif (chosen = 2) {
//show div 2 and 3
// hide div 1
}
elseif (chosen = 3) {
//show div 1 and 3
// hide div 2
}
else {
//show all div's
}
}
</script>
</head>
<body>
<select onChange="java script:ShowMeWhatIWant(this)">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
<div id="first">blah</div>
<div id="second">blah</div>
<div id="third">blah</div>
</body>
</html>
Question
WAR-DOG
hi folks, I would be really thankfull if someone has a script that hides and show an array of div's.
I need that to show stores in some regions, and some stores are in many regions if not all regions, so i want to filter out stores that are in a chosen region.
if i select number 2 in the drop down, i would see "blah 2" and "blah 3" and so on... Can anyone help?
Here is the code:
Edited by WAR-DOGLink to comment
Share on other sites
13 answers to this question
Recommended Posts