Re: Specifying HTML form names

2004-08-15 Thread jthompson
You could add your own attribute to a form tag, so that your javascript could distinguish forms based on the value/presence of this attribute. eg the following has 5 different forms, all with the same name and fields, but I've added a new attribute 'mylabel': function showForms() { var

Re: Specifying HTML form names

2004-08-14 Thread Matthew Van Horn
On Sun, 2004-08-15 at 00:19, Jacob Weber wrote: > I have a JSP with two forms, and they both need to go to the same > action. But Struts assumes that the "name" property of the HTML form > (e.g. ) should be the same as the name of the > associated form bean. As a result, I can't use JavaScript

Re: Specifying HTML form names

2004-08-14 Thread Hubert Rabago
IIRC, the form tag used to have an attribute so you can specify the form name, though I never used it because I never needed to. It was deprecated and eventually removed. Hubert --- Jacob Weber <[EMAIL PROTECTED]> wrote: > In article <[EMAIL PROTECTED]>, > Hubert Rabago <[EMAIL PROTECTED]> wro

Re: Specifying HTML form names

2004-08-14 Thread Jacob Weber
In article <[EMAIL PROTECTED]>, Hubert Rabago <[EMAIL PROTECTED]> wrote: > There was only one entry for the two similarly named forms. Checking the > fields of the form showed me that only the latest definition of a form with a > given name is recognized. > > So, you should probably add a formb

Re: Specifying HTML form names

2004-08-14 Thread Hubert Rabago
Just sharing a simple test I just did. It looks that you can't have two forms with the same name on one document. I created a page with two forms with the same name, then checked how the browser sees them with a quick javascript: var result = "Forms in this document:\n\n"; for (var i=0; i < docu