Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
This versus document.forms
Message
From
12/07/2001 00:46:14
 
 
To
11/07/2001 22:43:43
General information
Forum:
Internet
Category:
Javascript
Miscellaneous
Thread ID:
00529433
Message ID:
00529570
Views:
7
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform