OZONE Asylum
Forums
XML - XSL - XSLT - XHTML - CSS - DOM
Netscape 6 event handling
This page's ID:
10609
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
I am trying to figure out why NN6 onchange and onkeypress event handlers don't cancel the default actions when I return false. The simplified example below shows the situation: if you type any non-digit chars in the field, you should get an error message when you blur and not be able to leave the field on the first attempt. I have tried using event.preventDefault() as well to no effect. Does anyone out there know if this is a bug in the browser? I would prefer [this time] that I were wrong so I could move on. <html> <body> <form> <input type="text" onchange="return false;" /> <input type="submit" /> </form> <script language="javascript1.2"> document.forms[0].elements[0].onchange=function(){ if(/\D/.test(this.value)){ alert("Enter only digits"); return false; } } </script> </body> </html>
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »