Topic: Netscape 6 event handling (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=10609" title="Pages that link to Topic: Netscape 6 event handling (Page 1 of 1)" rel="nofollow" >Topic: Netscape 6 event handling <span class="small">(Page 1 of 1)</span>\

 
hlaford
Bipolar (III) Inmate

From: USA! USA! USA!
Insane since: Oct 2001

posted posted 10-04-2001 17:06

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>



mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 10-04-2001 22:11

Mozilla (NN6) doesn't interpret most events correctly. Nevertheless, form validation can still be done in Mozilla. Take a look at this exmaple that I created a long time ago: http://www.max.co.yu/ozone/form_validation.html

hlaford
Bipolar (III) Inmate

From: USA! USA! USA!
Insane since: Oct 2001

posted posted 10-04-2001 22:22

I was afraid of that.

I've been developing form validation over the years to an exact science. It is my latest effort to incorporate NN6 that has caused me troubles--even NN4 is fine, surprisingly. For all the CSS and DOM support, I would really like Netscape to be able to keep from hosing up their JS support in the process.

My validation effort is online at groups.yahoo.com/group/validation . The latest version there is 3.0.0b1, but my question applies to b2 which I was hoping to release soon. Guess I might do it anyway.

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 10-05-2001 01:39

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 10-05-2001 07:58

Yep, everything said is true...

In the near future, I'll be doing a lot of new things, especially since I have a new web server & new domain now...

MAX's World - http://www.maxworld.co.yu/

GRUMBLE
Paranoid (IV) Mad Scientist

From: Omicron Persei 8
Insane since: Oct 2000

posted posted 10-06-2001 01:12

hmmm.
where is the difference between max.co.yu and maxworld.co.yu ?

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 10-06-2001 01:20

MAX's World is technically much better web site than previous one (completley coded in PHP4 with MySQL backend). For a start, new web site works in *all* major web browsers (NN4, NN6, Mozilla, MSIE, O5, etc.) It has more content than before (more wallpapers, online journal, cafe, etc.), but some things are not completely uploaded *yet*. Oh, and one small detail - it has randomizlable themes, so next time when you come you'll see different color themes. And the list goes on and on. Old web server (max.co.yu) is now used only for heavy file storage. Also, it points to the new address...




[This message has been edited by mr.maX (edited 10-06-2001).]



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu