DanG
Registered User.
- Local time
- Today, 14:48
- Joined
- Nov 4, 2004
- Messages
- 477
I am working on a webpage that has 3 columns, the first column is a button, the second one is an image (with 4 hotspots) and the third column is text.
When the user clicks on a button (col#1) an image in col#2 shows up and when one of the four hotspots is chosen on the image the related text pops up.
The problem I am having is that when I click on the button (that was pressed in the beginning) I want it to hide both the image in col#2 AND the text in col#3. Currently it just hides the image and not the text in col#3.
I understand why it does this, I am just not sure how to fix it.
Main script:
The button code calls to the image div and then the image hotspots call to the related text divs.
Button code:
I hope this makes sense to someone. I imagine the code needs some logic, but I have actually never used java before
When the user clicks on a button (col#1) an image in col#2 shows up and when one of the four hotspots is chosen on the image the related text pops up.
The problem I am having is that when I click on the button (that was pressed in the beginning) I want it to hide both the image in col#2 AND the text in col#3. Currently it just hides the image and not the text in col#3.
I understand why it does this, I am just not sure how to fix it.
Main script:
Code:
<script type="text/javascript">
function toggleMe(a){
var e=document.getElementById(a);
if(!e)return true;
if(e.style.display=="none"){
e.style.display="block"
}
else{
e.style.display="none"
}
return true;
}
</script>
Button code:
Code:
<input type="button" onclick="return toggleMe('BigSky')" value="Big Sky" style="width:150">
I hope this makes sense to someone. I imagine the code needs some logic, but I have actually never used java before
