Be careful with that script!

Your onsubmit method is executed twice if it will return a value true!

You have to use this code:

if(document.forms['body:theForm'].onsubmit) {
     document.forms['body:theForm'].submit();
} else {
   document.forms['body:theForm'].submit();
}

otherwise:

if(document.forms['body:theForm'].onsubmit) {
if(document.forms['body:theForm'].onsubmit()) <<<<<<<- onsubmit is executed here and if it returns true submit document.forms['body:theForm'].submit(); <<<<<<<-- and onsubmit is executed here
} else {
    document.forms['body:theForm'].submit();
}

On Wed, 28 Sep 2005 03:24:06 +0200, Saul Qunming Yuan <[EMAIL PROTECTED]> wrote:

if(document.forms['body:theForm'].onsubmit) {
   if(document.forms['body:theForm'].onsubmit())
    document.forms['body:theForm'].submit();
  } else {
   document.forms['body:theForm'].submit();
  }


Reply via email to