![]() |
Available news archives:
comp.lang.tcl
-
comp.lang.python
-
comp.security.firewalls
-
sci.crypt -
comp.lang.php -
comp.lang.javascript
|
|
comp.lang.javascript archiveRe: 'Lost' function return value: what am I doing wrong?
From: Michael Winter <m.winter@blueyonder.co.uk>
Date: Mon Jan 09 2006 - 17:22:51 CET
On 09/01/2006 08:12, bdobby@fish.co.uk wrote:
[snip]
> I have a form with an onsubmit event handler:
The onsubmit attribute defines - internally - another function. It is
document.forms.uploadForm.onsubmit = function(event) {
As this function does not have a return statement, its result will
<form id="uploadForm" ... onsubmit="return checkDates();">
[snip]
> form.onsubmit = function(){MyClass.onsubmit(listId);};
A similar thing occurs here; the return value of that call must be
form.onsubmit = function() {return MyClass.onsubmit(listId);};
[snip]
Hope that helps,
-- Michael Winter Prefix subject with [News] before replying by e-mail.Received on Tue Jan 17 17:06:11 2006 |