W3C home > Mailing lists > Public > www-dom@w3.org > October to December 2007

Re: [HTML DOM] Proposal of method query() in HTMLFormElement

From: Master Sitesbr <master@sitesbr.net>
Date: Sat, 13 Oct 2007 11:42:42 -0300
Message-ID: <4710D962.4050009@sitesbr.net>
To: www-dom@w3.org

My oppinion:

I imagine that the submit event was created to verify ALL OTHER DATA in 
the form than "which submit button" was clicked ... In order to choose 
things in a form that is being submitted, there are other inputs, like radio buttons <input type='radio'...> or a dropdown list <select ...> .

But if it is really wanted 3 buttons I would use normal buttons, passing a number to a function that submits the form, ex:

<input type = "button" onclick="sendForm(1)" value="Google">

A hidden field would hold the "engine number" in the form, before sending it.

In the example, the sendForm( number) function receives the data from 
the button, it can perform a switch decision for something, then set the hidden field with 
the "engine number", and finally submit the form using the  form's submit() function.

About new specifications, it would solve the question if the last focused 
element held an information like "lastFocused = true". 
This way, the function used by the onsubmit event, could excute a loop for all form inputs, detecting the last focused one (by this new Property), which would be the "clicked" submit button.
Received on Saturday, 13 October 2007 14:53:01 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:13 UTC