GIDForums  

Go Back   GIDForums > Webmaster Forums > Web Design Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 11-Sep-2004, 15:47
nmahdjour nmahdjour is offline
New Member
 
Join Date: Sep 2004
Posts: 7
nmahdjour is on a distinguished road

show and hide div layers doesn't work with mozilla


Hi,
I have a code that works with IE but not with Mozilla. Div tags cannot be shown and hidden. Here are the most important parts:
...

PHP Code:

function MM_showHideLayers() {
  if(tp > 0 || bp > 0 || up > 0)
        return;
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; 
    obj.display=((v=='visible')?'':((v=='hidden')?'none':v)); }
}

var tp=0, bp=0, up=0;
function MM_stayShownLayer(imgName) { //v6.0
    ClearSelection();
    MM_showHideLayers(imgName,'','show');

    if(imgName == 'i001'){
        tp = 1;
        document.getElementById('frmSelection').txtSelection.value = "Tri-Point Series";
    }else if(imgName == 'i002'){
        bp = 1;
        document.getElementById('frmSelection').txtSelection.value = "Bi-Point Series";
    }else if(imgName == 'i003'){
        up = 1;
        document.getElementById('frmSelection').txtSelection.value = "Uni-Point Series";
    }
    document.getElementById('frmSelection').txtImage.value = imgName;
}
...

<div id="i001" style="position:relative; width:200px; height:115px; z-index:1; left: 0; top: 0; visibility: hidden; display:none;"><img src="images/i001.jpg" width="487" height="287" border="0" usemap="#Map5"></div>

<div id="i002" style="position:relative; width:200px; height:115px; z-index:2; left: 0; top: 0; visibility: hidden; display:none;"><img src="images/i002.jpg" width="487" height="287" border="0" usemap="#Map6"></div>

<div id="i003" style="position:relative; width:200px; height:115px; z-index:3; left: 0; top: 0; visibility: hidden; display:none;"><img src="images/i003.jpg" width="487" height="287" border="0" usemap="#Map7"></div>
...
<form id="frmSelection" action="step2.php" method="post">
              <font face="Arial, Helvetica, sans-serif" size="2">Cabinet Style 
              Selected</font> 
              <input type="text" name="txtSelection" value="<?php echo ((isset($_SESSION['step1SelText'][$cabindex])) ? $_SESSION['step1SelText'][$cabindex] : 'not yet selected') ?>" readonly>
              <input type="hidden" name="txtImage" value="<?php echo ((isset($_SESSION['step1SelImg'][$cabindex])) ? $_SESSION['step1SelImg'][$cabindex] : '') ?>" readonly>
              <font face="Arial, Helvetica, sans-serif" size="2" color="#999999">(Click 
              on icon to select)</font> 
            </form> 


...

Thanks in advance!
Nima
Last edited by admin : 11-Sep-2004 at 18:42. Reason: Please insert your example PHP codes between [php] and [/php] tags
  #2  
Old 11-Sep-2004, 17:50
nmahdjour nmahdjour is offline
New Member
 
Join Date: Sep 2004
Posts: 7
nmahdjour is on a distinguished road
Maybe I should have clarified the issue more: On mouse over showing , and hiding on mouseout works, just that the form selection and the image stays on click doesn't work with mozilla.
 
 

Recent GIDBlogNot selected for officer school by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
This JavaScript doesn't work on Mozilla. JdS Web Design Forum 8 02-Jul-2003 14:08

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 20:32.


vBulletin, Copyright © 2000 - 2010, Jelsoft Enterprises Ltd.