This ones a little different as I'm using some flash actionscript to control the swaping.
The following page uses a hideDiv, ShowDiv Javascript that is working flawlessly in Firefox/PC, Firefox/Mac, Safari/PC, and Safari/Mac but not ie6 or 7. They both have the same issue. They will swap divs once but afterwards all divs are set to hide. Please view the page below and hopefully it will clarify what I mean:
http://nailinc.com/New/web/flash.html
Heres the embeded js:
Expand|Select|Wrap|Line Numbers
- <script language=javascript type='text/javascript'>
- function hideDiv(pass) {
- var divs = document.getElementsByTagName('div');
- for(i=0;i<divs.length;i++){
- if(divs[i].id.match(pass)){//if they are 'see' divs
- if (document.getElementById) // DOM3 = IE5, NS6
- divs[i].style.visibility="hidden";// show/hide
- else
- if (document.layers) // Netscape 4
- document.layers[divs[i]].display = 'hidden';
- else // IE 4
- document.all.hideShow.divs[i].visibility = 'hidden';
- }
- }
- }
- function showdiv(pass) {
- var divs = document.getElementsByTagName('div');
- for(i=0;i<divs.length;i++){
- if(divs[i].id.match(pass)){
- if (document.getElementById)
- divs[i].style.visibility="visible";
- else
- if (document.layers) // Netscape 4
- document.layers[divs[i]].display = 'visible';
- else // IE 4
- document.all.hideShow.divs[i].visibility = 'visible';
- }
- }
- }
- </script>
Now the related actionscript, for those who care, looks like this:
Expand|Select|Wrap|Line Numbers
- onClipEvent (load) {
- this.onRelease = function() {
- getURL("javascript:showdiv('bob')");
- getURL("javascript:hideDiv('swap');hideDiv('steve');hideDiv('john');hideDiv('tim')");
- };
- }
Although I think the issue lies with the JS, as it is the thing I am the least familiar with.
Any thoughts would be excellent and much appreciated!
Thanks!