473,786 Members | 2,462 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 #1
16 2031
srinathpandit
14 New Member
Hi, The below javascript is not working in the firefox. Please help me..

[HTML]<script>
function Login(){
var done=0;
var username=docume nt.login.userna me.value;
username=userna me.toLowerCase( );
var password=docume nt.login.passwo rd.value;
password=passwo rd.toLowerCase( );
if (username=="adv enture" && password=="adve nture") { window.location ="myaccount/Redeem_Game_Car d.html"; done=1; }
if (done==0) {
document.getEle mentById("error _msg").style.di splay = "block";
}
}
</SCRIPT>


<a href="#" onClick="javasc ript:Login()">L OGIN</a>[/HTML]
Sep 4 '08 #2
Nepomuk
3,112 Recognized Expert Specialist
Hi srinathpandit! Welcome to bytes.com!

It's great to have you here!

When you post, please always keep to the Posting Guidelines and when you post code, please post it in [code] ... [/code] tags. Just look at how much nicer your code would look with them:
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") {
  9.       window.location="myaccount/Redeem_Game_Card.html"; done=1; }
  10.    if (done==0) {
  11.       document.getElementById("error_msg").style.display = "block";
  12.    }
  13. }
  14. </SCRIPT>
  15.  
  16.  
  17. <a href="#" onClick="javascript:Login()">LOGIN</a>
(although I did indent it manually)

As I've seen, you've also posted your question in the Javascript / DHTML / Ajax Forum - which is the right place for it. This isn't. So in future, please post your questions only in the relevant forum.

Otherwise, I'll just wish you the best and hope you enjoy being part of bytes.com!

Greetings,
Nepomuk
Sep 4 '08 #3
hussain123
28 New Member
What error message u r getting?
U can see the error message under Tools -->Error Console

-Hussain
Sep 4 '08 #4
srinathpandit
14 New Member
Hi,

Thanks for reply.

I am not getting any error message, But script is working in IE but not in firefox.
The requirement is, On giving user ID and Password, onclick on submit button,
the page should go to the Redeem_Game_Car d.html.

This is not working in firfox.

I checked the error Console, There is no script errors on it on some CSS issues are there.
Sep 4 '08 #5
srinathpandit
14 New Member
What error message u r getting?
U can see the error message under Tools -->Error Console

-Hussain
Hi,

Thanks for reply.

I am not getting any error message, But script is working in IE but not in firefox.
The requirement is, On giving user ID and Password, onclick on submit button,
the page should go to the Redeem_Game_Car d.html.

This is not working in firfox.

I checked the error Console, There is no script errors on it, only some CSS issues are there.
Sep 4 '08 #6
acoder
16,027 Recognized Expert Moderator MVP
Show the corresponding HTML code.
Sep 4 '08 #7
srinathpandit
14 New Member
Show the corresponding HTML code.

Hi,

The below code is HTML code for login page,

----------------------------------------------------------------------------
[HTML] <p class="input_ti tle">
Email Address:<br />
<input name="username" type="text" class="input_bo x" />
</p>
<p class="input_ti tle">
Password:<br />
<input name="password" type="password" class="input_bo x" />
</p>

<p class="checkbox "><input type="checkbox" />Remember me</p>
<span class="privacy_ link"><a href="/customercare/privacypolicy.a spx">Privacy Policy</a></span>

<div class="red_btn" >
<a href="#" onClick="javasc ript:Login()">L OGIN</a>
<div style="clear:bo th;"></div>
</div>[/HTML]
Sep 4 '08 #8
acoder
16,027 Recognized Expert Moderator MVP
Is your form named "login"?
Sep 4 '08 #9
srinathpandit
14 New Member
Is your form named "login"?
yes..

<form name="login" method="post" id="aspnetForm" >
Sep 4 '08 #10

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
1495
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
1842
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
3367
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
9496
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10363
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
10164
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
8989
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...
0
6745
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
5397
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4066
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
2
3669
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2894
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.