Re: Scripting Techniques first draft

Isofarro wrote:

> 2.) I prefer not to always return false on the onsubmit. It is the 
> function's job to determine whether it has been successful or not, and 
> inform the caller.
> 
> I'd much prefer the onsubmit to be:
>     onsubmit="return checkFields();"

I agree. Especially with the popup window example. Some proxy server 
scripts strip out calls even to requested popups, making the return 
false method fail. I wrote a little bit about this, and gave an example 
script in the following page's "Verify New Window" section.

<http://cookiecrook.com/AIR/2003/train/jsexamples.php>

Although I can't think of a similar accessibility problem with form 
submissions, it seems to be a smarter solution to use return values to 
cancel or approve the default action of markup elements. Ditto on the 
DOM comment instead of the document.werite method.

Cheers,
James

-- 
http://cookiecrook.com/

Received on Monday, 13 September 2004 23:12:30 UTC