Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
This versus document.forms
Message
De
12/07/2001 00:46:14
 
 
À
11/07/2001 22:43:43
Information générale
Forum:
Internet
Catégorie:
Javascript
Divers
Thread ID:
00529433
Message ID:
00529570
Vues:
8
>In any case, you should use the syntax as described by David Froderick, which is
>
>...FORM NAME=Sujet ACTION='anypageevennonexistant' ONSUBMIT='return Go(this)'
>
>
>In this case, 'this' refers to the form. It is perfectly legal in javascript to use the 'this' keyword to refer to an object. You can use it in any object, form field, etc. By using ONSUBMIT, you can control whether the form gets submitted or not, or do any other validation in the function, by returning true (form is submitted to ACTION value), or false (form is not submitted).

There is a particular reason why I do it like this. First of all, the form which is having a javascript call to Go() is not the form which is submitting the data. That is only a form on the page to handle specific operations. The Go() function will initiate a submit on another form as soon as we change some values of some hidden fields on the form to be submitted. Secondly, the function Go() is not a validate function but only an operational function that handles some data before we submit everything.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform