- From: Nikodem <nikn1@gazeta.pl>
- Date: Fri, 12 Oct 2007 13:51:19 +0200
- To: www-forms@w3.org
From: Nikodem <nikn1@gazeta.pl> Date: Thu, 11 Oct 2007 19:13:48 +0200 Message-ID: <470E59CC.7060904@gazeta.pl> To: www-dom@w3.org Subject: [HTML DOM] Proposal of method query() in HTMLFormElement I've had many problems with AJAX-ing forms that more than one <button type="submit">. It can't be handled through onsubmit with form.elements[0] etc. without such idiotisms like onclick on every button. I propose method query() that'd return query string (application/x-www-urlencoded). I.e.: <form onsubmit="alert(this.query())" action="search.php" method="get"> <input type="text" name="search" /> <button type="submit" name="engine" value="1">Google</button> <button type="submit" name="engine" value="2">Yahoo!</button> <button type="submit" name="engine" value="3">AltaVista</button> </form> <!-- search=xxx&engine=2 --> interface HTMLFormElement : HTMLElement { /* ... */ DOMString query() /* ... */ }
Received on Friday, 12 October 2007 11:51:49 UTC