SunQuest
 
           JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old September 11th, 2004, 05:14 PM
nmahdjour nmahdjour is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Posts: 10 nmahdjour User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
javascript show and hide does not 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:
...
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')?'non e':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').txtSelecti on.value = "Tri-Point Series";
}else if(imgName == 'i002'){
bp = 1;
document.getElementById('frmSelection').txtSelecti on.value = "Bi-Point Series";
}else if(imgName == 'i003'){
up = 1;
document.getElementById('frmSelection').txtSelecti on.value = "Uni-Point Series";
}
document.getElementById('frmSelection').txtImage.v alue = 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

Reply With Quote
  #2  
Old September 11th, 2004, 06:52 PM
nmahdjour nmahdjour is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Posts: 10 nmahdjour User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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.

Reply With Quote
  #3  
Old September 12th, 2004, 12:34 PM
EiSa EiSa is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2002
Location: Norway
Posts: 184 EiSa User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 22 m 24 sec
Reputation Power: 6
Try try using the "display" property rather than "visibility". Not sure if this will work, but worth a try.
__________________
Strictly CSS | Poker Cognac XO

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJavaScript Development > javascript show and hide does not work with mozilla


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  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 On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Iron Speed




© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway