Hi,
The below javascript is not working in the firefox, Please help me.. - <script>
-
function Login(){
-
var done=0;
-
var username=document.login.username.value;
-
username=username.toLowerCase();
-
var password=document.login.password.value;
-
password=password.toLowerCase();
-
if (username=="adventure" && password=="adventure") { window.location="myaccount/Redeem_Game_Card.html"; done=1; }
-
if (done==0) {
-
document.getElementById("error_msg").style.display = "block";
-
}
-
}
-
</SCRIPT>
16 2001
Hi, The below javascript is not working in the firefox. Please help me..
[HTML]<script>
function Login(){
var done=0;
var username=document.login.username.value;
username=username.toLowerCase();
var password=document.login.password.value;
password=password.toLowerCase();
if (username=="adventure" && password=="adventure") { window.location="myaccount/Redeem_Game_Card.html"; done=1; }
if (done==0) {
document.getElementById("error_msg").style.display = "block";
}
}
</SCRIPT>
<a href="#" onClick="javascript:Login()">LOGIN</a>[/HTML]
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: - <script>
-
function Login(){
-
var done=0;
-
var username=document.login.username.value;
-
username=username.toLowerCase();
-
var password=document.login.password.value;
-
password=password.toLowerCase();
-
if (username=="adventure" && password=="adventure") {
-
window.location="myaccount/Redeem_Game_Card.html"; done=1; }
-
if (done==0) {
-
document.getElementById("error_msg").style.display = "block";
-
}
-
}
-
</SCRIPT>
-
-
-
<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
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_Card.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.
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_Card.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.
Show the corresponding HTML code.
Show the corresponding HTML code.
Hi,
The below code is HTML code for login page,
----------------------------------------------------------------------------
[HTML] <p class="input_title">
Email Address:<br />
<input name="username" type="text" class="input_box" />
</p>
<p class="input_title">
Password:<br />
<input name="password" type="password" class="input_box" />
</p>
<p class="checkbox"><input type="checkbox" />Remember me</p>
<span class="privacy_link"><a href="/customercare/privacypolicy.aspx">Privacy Policy</a></span>
<div class="red_btn">
<a href="#" onClick="javascript :Login()">LOGIN</a>
<div style="clear:both;"></div>
</div>[/HTML]
Is your form named "login"?
Is your form named "login"?
yes..
<form name="login" method="post" id="aspnetForm">
Is your form named "login"?
yes...
<form name="login" method="post">
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.
yes..
in IE it will go to Redeem_Game_Card.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.
From a cursory look, the JavaScript code seems OK.
The HTML for the link could be changed to this: - <a href="#" onclick="Login(); return false;">LOGIN</a>
or better still use a button: - <input type="button" onclick="Login()" value="LOGIN">
Threads merged.
Moderator.
Threads merged.
Moderator.
Thank you so much, Its working (return false;). You r a genius........
Its working in both IE and Firefox.
You're welcome. Glad to help.
Sign in to post your reply or Sign up for a free account.
Similar topics
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>
|
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...
|
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.
|
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 =...
|
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...
|
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
|
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...
|
by: itgaurav198 |
last post by:
Hi,
I have the following script
function submitForm1()
{
document.forms.action="SearchRecords";
document.forms.submit();
}
|
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...
|
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,...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
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
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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: 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,...
|
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,...
|
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...
| |