>...FORM NAME=Sujet ACTION=javascript:Go(this) > >< SCRIPT> >function Go(toForm) >{ > alert(toForm.MyField.value); >} >>
>...FORM NAME=Sujet ACTION=javascript:Go(document.forms.Sujet) > >< SCRIPT> >function Go(toForm) >{ > alert(toForm.MyField.value); >} >>
...FORM NAME=Sujet ACTION=javascript:Go(document.forms.Sujet) < SCRIPT> function Go(toForm) { alert(toForm.forms.sujet.MyField.value); }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).