Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #14433
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!news.musoftware.de!wum.musoftware.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail |
|---|---|
| From | "Mel Smith" <med_cutout_syntel@aol.com> |
| Newsgroups | comp.lang.javascript |
| Subject | Problem with FF |
| Date | Sun, 10 Jun 2012 13:31:21 -0600 |
| Lines | 87 |
| Message-ID | <a3kb0bFr9bU1@mid.individual.net> (permalink) |
| X-Trace | individual.net Dgs8SRxLQFSLZJs3CAWaDgtvuoICICzPW867Mc0sRe3tX6CdxukxrT+UuWkz1xVezh |
| Cancel-Lock | sha1:zArWoCfrGU57ljgAUzmIdJ9C7MI= |
| X-Priority | 3 |
| X-MSMail-Priority | Normal |
| X-Newsreader | Microsoft Outlook Express 6.00.2900.5931 |
| X-MIMEOLE | Produced By Microsoft MimeOLE V6.00.2900.6157 |
| X-RFC2646 | Format=Flowed; Original |
| Xref | csiph.com comp.lang.javascript:14433 |
Show key headers only | View raw
Hi:
I'm having a problem with FireFox in the code below. However, IE 7 and
Chrome work properly.
My code below is surely suspect :((
Would someone suggest a correction so that FF, Chrome, and IE work in
the same fashion: i.e., operation returns to my password box with every
keystroke except <cr> and <tab>
I have commented the place where FF signals the error: " e is
undefined ", this error occurs every time I enter a character in my password
text input box.
Thank you !
--
Mel Smith
************ Here's relevant code ************
function submitpwd() {
if (!e) var e = window.event ;
// for the next line, FF says: 'e is not defined'. However, IE and
Chrome perform properly
var nkey = e.charCode ? e.charCode : e.keyCode ;
if ((nkey != 9) && (nkey != 13) ) {
return true ;
}
if(event.stopPropagation) {
event.stopPropagation ;
}
event.cancelBubble = true ;
/*
// I've tried with and without calling stopEvent(). There is no difference.
stopEvent(e) ;
*/
var pwdval = "" ;
var el = document.getElementById("ipwdfld") ;
pwdval = alltrim(el.value) ;
if (pwdval.length < 5) {
window.alert("Password must 5 or 6 digits. Please Fix.") ;
return false ;
}
var pwd = document.getElementById("ipwd") ;
pwd.value = pwdval; // set it to the input value for server to access
var drawel = document.getElementById("idraw") ;
drawel.value = clubdraw ;
// fill in the hidden fields for the server
var pwddivel = document.getElementById("ipassword") ;
pwddivel.style.display = "none" ;
var msgel = document.getElementById("imessage") ;
msgel.style.display = "inline" ;
formel = document.getElementById("iformmenu") ;
formel.submit() ;
return true ;
}
function stopEvent(e) {
if(!e) var e = window.event;
//e.cancelBubble is supported by IE - this will kill the bubbling process.
e.cancelBubble = true;
e.returnValue = false;
//e.stopPropagation works only in Firefox.
if (e.stopPropagation) {
e.stopPropagation();
e.preventDefault();
}
return false;
}
**************** end of code **************
Back to comp.lang.javascript | Previous | Next — Next in thread | Find similar | Unroll thread
Problem with FF "Mel Smith" <med_cutout_syntel@aol.com> - 2012-06-10 13:31 -0600
Re: Problem with FF Andrew Poulos <ap_prog@hotmail.com> - 2012-06-11 08:45 +1000
Re: Problem with FF "Mel Smith" <med_cutout_syntel@aol.com> - 2012-06-10 21:17 -0600
Re: Problem with FF Gene Wirchenko <genew@ocis.net> - 2012-06-10 21:12 -0700
Re: Problem with FF Martin Honnen <mahotrash@yahoo.de> - 2012-06-11 13:02 +0200
Re: Problem with FF Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-06-11 13:28 +0200
Re: Problem with FF Martin Honnen <mahotrash@yahoo.de> - 2012-06-11 15:11 +0200
Re: Problem with FF "Mel Smith" <med_cutout_syntel@aol.com> - 2012-06-11 08:11 -0600
Re: Problem with FF "Mel Smith" <med_cutout_syntel@aol.com> - 2012-06-11 08:33 -0600
Re: Problem with FF Dr J R Stockton <reply1224@merlyn.demon.co.uk.not.invalid> - 2012-06-11 18:32 +0100
csiph-web