473,549 Members | 3,109 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Javascript not working in Firefox

4 New Member
my javascript code works great in IE but not in Firefox, can anyone help? Thanks!! Here is the code:
Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript">
  2. <!--
  3. function MM_findObj(n, d) { //v3.0
  4.   var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
  5.     d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  6.   if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  7.   for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
  8. }
  9.  
  10. function MM_showHideLayers() { //v3.0
  11.   var i,p,v,obj,args=MM_showHideLayers.arguments;
  12.   for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
  13.     if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
  14.     obj.visibility=v; }
  15. }
  16.  
  17. //-->
  18. </script>
Expand|Select|Wrap|Line Numbers
  1. <div id="novosti" style="position:absolute; left:121px; top:175px; width:83px; height:15px; z-index:13" onmouseover="MM_showHideLayers('galery2','','hide','magazin2','','hide','novosti2','','show','tutorijali2','','hide','digitalarts2','','hide')"> 
  2.   <p><font face="Eras Bold ITC" style="font-size: 12pt">
  3.     <a style="text-decoration: none" href="index2.htm">Home</a></font></p>
  4.   </div>
  5.  
  6. <!--Industrial Tab-->
  7. <div id="magazin" style="position:absolute; left:273px; top:175px; width:100px; height:15px; z-index:10" onmouseover="MM_showHideLayers('galery2','','hide','magazin2','','show','novosti2','','hide','tutorijali2','','hide','digitalarts2','','hide')"> 
  8.   <p><p><font face="Eras Bold ITC" style="font-size: 12pt">
  9.     <a href="#" style="text-decoration: none">Industrial</a></p></font>
  10.   </div>
  11. <div id="magazin2" style="position:absolute; left:273px; top:196px; height:25px; z-index:12; visibility: hidden; width:147px"> 
  12.   <table width=147 border="0" cellspacing="0" cellpadding="5" bgcolor=#333333>
  13.      <tr> 
  14.       <td><span><p><font face="Eras Medium ITC" size="2"><a href=Machinery.htm>Machinery</a></font></span></p>
  15.         </td>
  16.     </tr>
  17.     <tr> 
  18.       <td> 
  19.         <p><font face="Eras Medium ITC" size="2"><a href=UsedMachinery.htm>Used Machinery</a> </font></p>
  20.         </td>
  21.     </tr>
  22.     <tr> 
  23.       <td> 
  24.         <p><font face="Eras Medium ITC" size="2"><a href=StandingTimber.htm>Standing Timber</a> </font></p>
  25.         </td>
  26.     </tr>
  27.      <tr> 
  28.       <td>
  29.         <p><font face="Eras Medium ITC" size="2"><a href=Millwork.htm>Millwork</a> </font></p>
  30.         </td>
  31.     </tr>
  32.      <tr> 
  33.       <td>
  34.         <p><font face="Eras Medium ITC" size="2"><a href=HardwoodFlooring.htm>Hardwood Flooring</a> </font></p>
  35.         </td>
  36.     </tr>
  37.   </table>
  38. </div>
  39.  
  40. <!--END of Industrial Tab-->
  41.  
  42. <div id="galery" style="position:absolute; left:414px; top:175px; width:171px; height:16px; z-index:8" onmouseover="MM_showHideLayers('galery2','','show','magazin2','','hide','novosti2','','hide','tutorijali2','','hide','digitalarts2','','hide')"> 
  43.   <p><font face="Eras Bold ITC" style="font-size: 12pt">
  44.     <a href="#" style="text-decoration: none">Hardwood Items</a></font></p>
  45.   </div>
  46.  
  47. <div id="galery2" style="position:absolute; left:414px; top:197px; width:171px; height:20px; z-index:9; visibility: hidden"> 
  48.  
  49.  
  50.   <table width=145 border="0" cellspacing="0" cellpadding="5" bgcolor=#333333>
  51.      <tr> 
  52.       <td><span><p><font face="Eras Medium ITC" size="2"><a href=Cart/CellValets/OpeningPage.htm>Charging Stations</a></font></span></p>
  53.         </td>
  54.     </tr>
  55.     <tr> 
  56.       <td> 
  57.         <p><font face="Eras Medium ITC" size="2"><a href=Cart/DogCages.htm>Dog/Pet Crates</a> </font></p>
  58.         </td>
  59.     </tr>
  60.     <tr> 
  61.       <td> 
  62.         <p><font face="Eras Medium ITC" size="2"><a href=Cart/DogGates.htm>Dog/Pet Gates</a> </font></p>
  63.         </td>
  64.     </tr>
  65.      <tr> 
  66.       <td>
  67.         <p><font face="Eras Medium ITC" size="2"><a href=Cart/StorageServer.htm>Storage Servers</a> </font></p>
  68.         </td>
  69.     </tr>
  70.   </table>
  71. </div>
  72.  
  73.  
  74.  
  75. <div id="tutorijali" style="position:absolute; left:598px; top:175px; width:146px; height:15px; z-index:15" onmouseover="MM_showHideLayers('galery2','','hide','magazin2','','hide','novosti2','','hide','tutorijali2','','show','digitalarts2','','hide')"> 
  76.   <p><a href=AboutUs.htm style="text-decoration: none">
  77.     <font size="3" face="Eras Bold ITC">About Us</font></a></p>
  78.   </div>
  79.  
  80.  
  81.  
  82.  
  83. <div id="digitalarts" style="position:absolute; left:776px; top:175px; width:126px; height:16px; z-index:17" onmouseover="MM_showHideLayers('galery2','','hide','magazin2','','hide','novosti2','','hide','tutorijali2','','hide','digitalarts2','','show')"> 
  84.   <p><a href=ContactUs.htm style="text-decoration: none">
  85.     <font face="Eras Bold ITC" size="3">Contact Us</font></a></p>
  86.   </div>
Mar 24 '09 #1
7 3572
Dormilich
8,658 Recognized Expert Moderator Expert
does firefox' error console say something?
Mar 24 '09 #2
hollopeterb
4 New Member
Warning: Unknown property 'text-underline-style'. Declaration dropped.
Source File: http://www.medinatractor.com/Specials/SalesSpecials.htm
Line: 0

this is all that is in the console......th anks

OOOOPS NEVERMIND, DIFFERENT WEBSITE THERE....THERE IS NOTHING IN THE ERROR CONSOLE, I CLEARED AND RELOADED THE WEBPAGE IN QUESTION. SORRY!
Mar 24 '09 #3
hollopeterb
4 New Member
@Dormilich

any ideas? the console didnt come up with any errors. thanks!
Mar 24 '09 #4
Dormilich
8,658 Recognized Expert Moderator Expert
what exactly do you expect to work, that's not working?
Mar 24 '09 #5
hollopeterb
4 New Member
the menu animation is not showing up, its a dropdown menu. you can see in person at www.lattasburglumberworks.com

try it in IE then in Firefox, the alignment is messed up as well. thanks for any input you may have!
Mar 24 '09 #6
Dormilich
8,658 Recognized Expert Moderator Expert
the problem with that is, that I'd need Windows to run IE, which I haven't.

though I can say some general things:
  • <font> is deprecated for quite a long time now, CSS is better suited for that
  • too many tables
  • IE uses a non-standard box model (width(ie) = width(w3c) + padding + border)
  • never assume IE display is correct (although it can be)
  • be careful when using absolute positioning
the current technique for a dropdown (as far as I know) is the CSS driven Suckerfish Dropdown (if you want to try it)
Mar 24 '09 #7
acoder
16,027 Recognized Expert Moderator MVP
It seems to work well in Firefox. The alignment is messed up but that's a CSS problem.

I'd also echo what Dormilich said: don't use IE as a benchmark if you want cross-browser compatibility.
Mar 28 '09 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

8
3636
by: chrisdude911 | last post by:
how do i add video into a javascript web page with my own custom buttons?
7
9583
by: Coder | last post by:
Hi I have the following code in java script, it is not giving proper output in FIREFOX but running fine in IE... can anybody help me out to make this run in FIREFOX . <script language="JavaScript"> var cntlName; var eleTarget = document.getElementById('hiding'); function showOrHide(){
13
1948
by: David Golightly | last post by:
I'm getting my feet wet with JavaScript 1.7 (Firefox 2.0 only) and messing around with it in the console, working through some of the exercises given at http://developer.mozilla.org/en/docs/New_in_JavaScript_1.7 Looks like the "version" function isn't supported, at least not in the Firefox console. So many of the new features - especially...
16
2306
by: Eric | last post by:
I have a user of a web application written in Java/JSP that is unable to login to the site simply because certain links on the page do not run when they are clicked. Other popups using Javascript on the same page work correctly. It appears to be isolated to 1-2 machines in a particular network. I cannot verify whether these machines have...
1
1475
by: nitinp | last post by:
hello, I am trying to validate empty textbox value by javascript in Firefox. It is working fine in IE but not in Firefox. Note - code is for ASP.NET <script runat="server"> protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) Button1.Attributes.Add("onclick", "javascript:checkForm();");
12
2566
by: tim | last post by:
I am using foldoutmenu 3 and am having problems with viewing my menus in firefox. On my sub3 menus i have more than one line of text in some places. firefox does not recognise that there is more than one line and the text simply overlaps the sub-menus below it. I thought i had got around this by placing empty 'spacers' like so; ...
16
3526
by: eben | last post by:
I've been playing with the canvas primitive available in some of the modern browsers, and have put together a little 3d engine that I thought other people might find useful. See http://ajax3d.sourceforge.net/ I'd appreciate any feedback (and an explanation of why it doesn't seem to like Safari). Eben
2
1749
by: barrymars | last post by:
First posting here so bear with me. i'm working on a double tabbed menu system for a web aplpication, where the first row of 'divs' control visibility of the second row of 'divs'. It all works fine in IE7 but when i open it in firefox i only get the top row with nothing being rendered for the bottom row. some of the javascript is working...
5
19061
by: cbs7 | last post by:
Hi all I'm a complete newbie to web development and Javascript especially. I've been creating a form for a webpage and have used a validation script gen_validatorv2.js which I downloaded from the zip file referenced on http://www.javascript-coder.com/html-form/javascript-form-validation.phtml I managed to get everything working and was...
4
6036
by: iamaporkaholic | last post by:
The main page of the site has this script which determines the language settings of the OS. This works fine for IE but not for firefox. Is there any other codes which i have to insert to make sure Firefox would be able to load it? <script type="text/javascript"> function detectlang() { var lang=navigator.userLanguage var...
0
7446
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7956
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7470
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5368
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5088
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3498
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3480
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1936
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
763
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.