473,799 Members | 3,052 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

javascript is not working in firefox

14 New Member
Hi,

The below javascript is not working in the firefox, Please help me..

Expand|Select|Wrap|Line Numbers
  1. <script>
  2. function Login(){
  3. var done=0;
  4. var username=document.login.username.value;
  5. username=username.toLowerCase();
  6. var password=document.login.password.value;
  7. password=password.toLowerCase();
  8. if (username=="adventure" && password=="adventure") { window.location="myaccount/Redeem_Game_Card.html"; done=1; }
  9. if (done==0) {
  10. document.getElementById("error_msg").style.display = "block";
  11.  }
  12. }
  13. </SCRIPT>
Sep 4 '08
16 2036
srinathpandit
14 New Member
Is your form named "login"?
yes...

<form name="login" method="post">
Sep 4 '08 #11
acoder
16,027 Recognized Expert Moderator MVP
When you say it's not working, what happens? Does it just stay on the page even if you input the correct username/password?

PS. you shouldn't have login code on the client-side.
Sep 4 '08 #12
srinathpandit
14 New Member
yes..
in IE it will go to Redeem_Game_Car d.html page, but in Firefox it will saty in that page only and it wont show any error also, Is there any error in the code? i am confused...

Is there any other way or code for this type of requirement.
Sep 4 '08 #13
acoder
16,027 Recognized Expert Moderator MVP
From a cursory look, the JavaScript code seems OK.

The HTML for the link could be changed to this:
Expand|Select|Wrap|Line Numbers
  1. <a href="#" onclick="Login(); return false;">LOGIN</a>
or better still use a button:
Expand|Select|Wrap|Line Numbers
  1. <input type="button" onclick="Login()" value="LOGIN">
Sep 4 '08 #14
acoder
16,027 Recognized Expert Moderator MVP
Threads merged.

Moderator.
Sep 4 '08 #15
srinathpandit
14 New Member
Threads merged.

Moderator.

Thank you so much, Its working (return false;). You r a genius........

Its working in both IE and Firefox.
Sep 5 '08 #16
acoder
16,027 Recognized Expert Moderator MVP
You're welcome. Glad to help.
Sep 5 '08 #17

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

Similar topics

4
2331
by: lmarceglia | last post by:
Hi, I have this website that doesn't work in Firefox 1.5: www.pianetaluca.com The HTML source is: <TITLE>PianetaLuca</TITLE> </HEAD>
1
1496
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();");
8
2174
by: sultanwadood | last post by:
Hi all. I need to know how to disable javascript through javascript in firefox. thanks in advance if some one could help me. Sultan Wadood.
6
1980
by: ApOG | last post by:
Hello everyone, I have this javascript code working perfectly with IE, but with firefox nothing happens when running the function... function add_div_field () { var ni = document.getElementById('upload_div'); var num = contador_upload++; var div = document.createElement("div"); var div_name = "filediv"+num; div.setAttribute("id",div_name);
1
1844
by: web20tester | last post by:
Hi all, I am new to javascript. I have this script working fine in IE but cannot work in firefox. Really appreciate on any guidance. search0.js function Search(str) { var textD=parent.textFrame.document; var SearchRange = textD.body.createTextRange();
1
6612
by: aal | last post by:
Hi experts, How would look the following IE javaScript in Firefox? var wrd = new ActiveXObject("Word.Application"); var excl = new ActiveXObject("Excel.Application"); Thanks aal
3
1908
by: yurcheg | last post by:
Hi, I've searched the forum for this problem but haven't found anything relevant. I've got a javascript code which dynamically creates list-boxes in a form. It works perfectly fine in IE, but in Firefox 2 I change the selected value in a list-box but nothing gets submitted via POST. The dynamic list-box creation code looks like this: <form name="form0" method=POST action="/dynamic/AppDirector/Global/GlobalParameters" onkeypress="return...
26
3378
by: itgaurav198 | last post by:
Hi, I have the following script function submitForm1() { document.forms.action="SearchRecords"; document.forms.submit(); }
1
1682
by: Rewire | last post by:
This script seems to work fine with firefox but not with IE. It just sets style="display:none" or style="display:" to show / hide submenu items on my menu. I've just tried making it save to a cookie which submenu is currently displayed and reopen that menu on a new page load. checkCookie() is called onload and switchMenu(menuidhere) when the main menu item is clicked to make the submenu appear. Firefox doesn't display any js errors and...
0
9687
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10482
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10251
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9072
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7564
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6805
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5585
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3759
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2938
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.