Forum Moderators: open
I have a small problem and may be because I am new to javascript, I couldn't get it.
I have a frame on which I put Tab gif images, and when the user clicks any of those tabs, the image shows up in the container below for that tab text.And
if the user wants to look at all the images at once, then I've put another tab image on the same frame with text "Select AllImages". It displays all the images below at the bottom of the webpage.And if the user clicks the same tab again, all the images should disappear and I got it working(Using <div>).
So, what I am not getting is once the user selects this tab("select allimages"), the tab text should show "Close allimages" on the frame tab and as the user clicks it, the text on the tab image should turn back to "Select AllImages".
Any help is highly appreciated!
thanks
I am sure there is a better way on doing this and I am sure someone else shall come forward with the best way of doing it, but here is a start:
<script language="javascript">
function showhide(){
document.getElementById("show").style.display = 'none';
document.getElementById("hide").style.display = '';
}
function hideshow(){
document.getElementById("show").style.display = '';
document.getElementById("hide").style.display = 'none';
}
</script>
</head>
<body>
<div id="show" style="display:visible" onclick="javascript:showhide();"><img src="/imgs/show.gif"></div>
<div id="hide" style="display:none" onclick="javascript:hideshow();"><img src="/imgs/hide.gif"></div>
Hope this helps in the meantime...
-george