|
|
Firefox: Filter Extended Ascii from Form
I've tried about 300 iterrations of this same ability, and none of them seem
to work in Firefox. Take the following code for example. It WILL stop me
from entering zero into the first text box, but it wont stop me from
entering extended ascii characters (which is the final goal).
Two items of note:
1) Typing ALT+0156 inputs "o". And strangely enough the statusbar text gets
set to "ALT0moz2 ALT0moz2 ALT0moz2". Only 3 ALT sequences show up when I
actually type 4 characters
2)Im working on a laptop that has no true numpad, so the '0' may be a result
of me having to hold down a special function key in order to enable a numpad
overlay.). So the check for altKey is correctly working, but attempting to
cancel the ALT event fails.
Does anyone know what is wrong with this, or have a working example that
stops ALT keypresses / Extended chars in FIREFOX ?
<script type="text/javascript">
if(document.addEventListener){
document.addEventListener("keypress", HandleEnterKey, true);
}
else{
document.attachEvent("onkeypress", HandleEnterKey);
}
// Handle the enter key for a section of a form, binding it to the provided
submit buton
function HandleEnterKey(event) {
var nav = window.Event ? true : false;
if (nav) {
return NetscapeEventHandler_KeyDown(event);
} else {
return MicrosoftEventHandler_KeyDown();
}
}
function NetscapeEventHandler_KeyDown(e) {
if (e.which == 48) {
window.status = window.status + e.which + "moz1 ";
e.returnValue = false;
e.cancel = true;
e.preventDefault();
return false;
} else if (e.altKey) {
window.status = window.status + "ALT" + e.which + "moz2 ";
e.returnValue = false;
e.cancel = true;
e.stopPropagation();
e.preventDefault();
return false;
}
return true;
}
</script>
</head>
<body>
<form action="" id="theForm">
<input type="text" id="i1" name="i1" />
</form>
|
|
0
|
|
|
|
Reply
|
news
|
9/17/2005 4:34:17 AM |
|
|
0 Replies
327 Views
(page loaded in 0.023 seconds)
Similiar Articles: Firefox: Filter Extended Ascii from Form - comp.lang.javascript ...Get Record count of EBCDIC file - comp.unix.shell [I filter all Goggle Groups posts, so any ... have an all-string, tab-delimited ASCII text file of the form ... ... window.document.execCommand("SaveAs" - comp.lang.javascript ...Firefox: Filter Extended Ascii from Form - comp.lang.javascript ... Firefox: Filter Extended Ascii from Form - comp.lang.javascript ... if(document.addEventListener ... close form programatically - comp.database.oracleFirefox: Filter Extended Ascii from Form - comp.lang.javascript ... Get Record count of EBCDIC file - comp.unix.shell [I filter all Goggle Groups posts, so any ... have an ... How to print Extended ASCII Characters - comp.lang.fortran ...American Standard Code for Information Interchange ... sed ... Remove non-printable ASCII ... Firefox: Filter Extended Ascii from Form - comp.lang.javascript ... read extended ... need help parsing PDF documents - comp.text.pdfflateDecode filter - comp.text.pdf need help parsing PDF documents - comp.text.pdf flateDecode filter - comp.text.pdf Firefox: Filter Extended Ascii from Form - comp.lang ... Korean chars on javascript alerts - comp.lang.javascript ...Firefox: Filter Extended Ascii from Form - comp.lang.javascript ... Does anyone know what is wrong with this, or have a working example that stops ALT keypresses ... Iterating over a String - comp.lang.java.help... each syntax would not let me write code of the form ... Osmanya >> (Somalian), Byzantine music symbols, extended ... An Abundance, my own language, fields come with filters ... Sliding Goertzel of Jacobsen&Lions correct? - comp.dspSo, of the four forms of the Sliding DFT that I've ... For the N-sample Sliding Goertzel, the comb filter ... So we have extended the sliding DFT to update a frame of ... Need a FORTRAN compiler for Win7 (or XP) - comp.lang.fortran ...Going to another FireFox (FF) (Newsgroup)NG. > > Your ... ftp> ls 200 PORT command successful 150 Opening ASCII ... Don't know the cost yet, or what extended capabilities it ... [comp.publish.cdrom] CD-Recordable FAQ, Part 1/4 - comp.publish ...Archive-name: cdrom/cd-recordable/part1 Posting-Frequency: monthly Last-modified: 2008/10/09 Version: 2.71 Send corrections and updates to And... Firefox: Filter Extended Ascii from Form - comp.lang.javascript ...Get Record count of EBCDIC file - comp.unix.shell [I filter all Goggle Groups posts, so any ... have an all-string, tab-delimited ASCII text file of the form ... ... Firefox: Filter Extended Ascii from Form - JavaScript / Ajax / DHTMLFirefox: Filter Extended Ascii from Form. JavaScript / Ajax / DHTML Forums on Bytes. 7/24/2012 4:21:02 AM
|
|
|
|
|
|
|
|
|