You are here: Re: event handler attachment « HTML « IT news, forums, messages
Re: event handler attachment

Posted by Martin Jay on 06/25/06 13:12

In message <ce7ee$449e159b$40cba7c7$8381@NAXS.COM>, Jonathan N. Little
<lws4art@centralva.net> writes
>Event handlers attached by 'addEventListener' do not seem to pass
>values in time to cancel form submission unlike the methods that it is
>supposed to replace. In an attempt to keep the markup as clean as
>possible, I add the handlers from the attached javascript page and I
>have noticed the trouble. Small demo to illustrate:
>
><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
> "http://www.w3.org/TR/html4/strict.dtd">
><html><head><title>Attached Events</title>
>
><script type="text/javascript">
>function cancelIt(){
> alert("This should cancel the form submission");
> return false;
>}

PreventDefault();

There's some information about it and the IE alternative at:
<http://www.howtocreate.co.uk/tutorials/javascript/domevents>
--
Martin Jay
Phone/SMS: +44 7740 191877
Fax: +44 870 915 2124

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация