473,383 Members | 1,863 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Firefox Compatibility

2
Hi guys

Im having problems with one of my JScripts to support Firefox (works fine in IE)

So...

Expand|Select|Wrap|Line Numbers
  1. function submitItOrder( sForm,sOrder )
  2. {
  3.     // Coloca o comando no hide
  4.     if ( document.all )
  5.     {
  6.     idForm = eval( "document.all." + sForm );
  7.     if ( sOrder != "" )
  8.     {
  9.         idForm.cmd.value = "PgInicio";
  10.         idForm.pag.value = 0;
  11.         idForm.idOrder.value = sOrder;
  12.         idForm.lintot.value = 0;
  13.     }
  14.     idForm.submit();
  15.     }
  16.     else if (  document.getElementById && !document.all )
  17.     alert( 'Navegador: Firefox' );
  18. }
  19.  
  20. function submitItTRANF(sForm,sCmd,sPag,sOrder,sLintot )
  21. {
  22.     // Coloca o comando no hide
  23.     if ( document.all )
  24.     {
  25.     idForm = eval( "document.all." + sForm );
  26.     if ( sCmd != "" )
  27.     {
  28.         idForm.cmd.value     = sCmd;
  29.         idForm.pag.value     = sPag;
  30.         idForm.idOrder.value = sOrder;
  31.         idForm.lintot.value  = sLintot;
  32.     }
  33.     idForm.submit();
  34.     }
  35.     else
  36.     alert( 'Referencia inválida: ' + sForm );
  37. }
Help me plz? I know that i must use document.getElementById but i dont know how to use it properly...
Mar 23 '10 #1
3 1304
Dormilich
8,658 Expert Mod 8TB
recommendation #1: drop document.all
recommendation #2: drop eval()
recommendation #3: read a tutorial, document.getElementById() is, er, required basic knowledge
Mar 23 '10 #2
nydiow
2
After read a little, i tried that...

Expand|Select|Wrap|Line Numbers
  1. function submitItOrder( sForm,sOrder )
  2. {
  3.     // Coloca o comando no hide
  4.     if ( document.getElementById )
  5.     {
  6.     //idForm = eval( "document.all." + sForm );
  7.     if ( sOrder != "" )
  8.     {
  9.         document.getElementById(cmd).value = "PgInicio";
  10.         document.getElementById(pag).value = 0;
  11.         document.getElementById(idOrder).value = sOrder;
  12.         document.getElementById(lintot).value = 0;
  13.     }
  14.     document.getElementById.submit();
  15.     }
  16.     else if (  document.getElementById && !document.all )
  17.     alert( 'Navegador: Firefox' );
  18. }
and didnt work
Mar 23 '10 #3
Dormilich
8,658 Expert Mod 8TB
the variables cmd, pag, idOrder & lintot are all undefined, unless you set them somewhere else.
Mar 24 '10 #4

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

Similar topics

18
by: Niels | last post by:
Hi group, I have some problems with clearing floated divs. My usual method works fine in Konqueror, but not in Firefox. Here's an example: <html><body> <div id='left' style='float:left;...
15
by: 50295 | last post by:
Hi everyone, This one is better experienced than explained, so I'm including a code sample below. Please and save (as an html file) and view with NN or Firefox (or maybe even Mozilla), and then...
36
by: Simon Wigzell | last post by:
I have the following in my webpage: <body onresize=CenterIt(); onMouseMove=mouseCheck(event);> CenterIt and mouseCheck are my own javascript functions. Works fine for IE and Opera, doesn't...
4
by: fcurvat | last post by:
Hello, I've got a little problem with <script></script> under firefox 1.0.7 If the script is not placed in the body tag, it isn't automaticaly executed, but it is under Internet Explorer. ...
5
by: BJ | last post by:
Hi, I add label and text box fields dynamically in code using C# and ASP.NET. I set the width of the label using: Label label = new Label(); label.Width = 20; label.Text = "Test";...
45
by: Pat | last post by:
its seems asp.net validation doesn't fire when using FireFox? Tested a page and it doesn't fire. It seems the javascript doesn't fire Any ideas?
1
by: newspost2000 | last post by:
If anyone could help me out here. I am the webmaster of the following corporate website: http://www.otpp.com/. When I load this page in IE or Netscape for PC the postion of all of the elements on...
3
by: VK | last post by:
A minor Firefox update was released (now 1.5.0.1) Full list of fixes can be found here: <http://www.mozilla.com/firefox/releases/1.5.0.1.html> Unfortunately the same update bans Venkman for...
10
by: Paul Gorodyansky | last post by:
Hi, Ran into the problem today - in INPUT field Firefox executes clean-yp of the content if a user presses Esc, _before_ control goes to the code via onkeydown - and search showed that it's a...
5
by: Charlie | last post by:
Hi: I have some Custom server controls (validated textboxes) in a panel on a form. In Firefox, it looks all hosed up. Also, pictures show place holders while loading. What are my options for...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.