When you click on the submit button, is mybutton submitted or is it
mysubmit? By the html spec, mysubmit will be submitted to the server. This
is due to the name value pair being on the submit button tag.
Chris Erskine
EDS Consulting Services
F5-EDS-001
2424 Garden of the Gods Rd
Colorado Springs, CO 80919
Phone: 719-535-6064
> -----Original Message-----
> From: Vinay Murthy [mailto:vin...@gm...]
> Sent: Thursday, November 18, 2004 2:01 AM
> To: htm...@li...
> Subject: [Htmlunit-user] input type="button"
>
> Hi,
>
> I am still with 1.3 pre 2. I noticed that when I submit a form(with
> method= get) containing certain buttons in it, the <name,value> pairs
> associated with the buttons get sent across as submittable parameters.
> This doesnt generally happen on a browser right ? Is this some kind of
> an intentional behaviour of HtmlUnit ?
>
> For example , for the html code given below:
> <html>
> <head>
> <title> Test Button Submission </title>
> </head>
> <body>
> <form name="myform" method="GET"
> action="http://localhost:8080/QS/thanks.html">
> Name: <input type="text" name="myname">
> Email: <input type="text" name="myaddress">
> <input type="button" name="mybutton"
> value="DontClickMe!!!">
> <input type="submit" name="mysubmit"
value="ClickMe!!!">
> </form>
> </body>
> </html>
>
> the method getAllSubmittableElements() outputs
> "[HtmlTextInput[<input type="text" name="myname">],
> HtmlTextInput[<input type="text" name="myaddress">],
> HtmlButtonInput[<input name="mybutton" type="button"
> value="DontClickMe!!!">]]"
>
> while getParameterListForSubmit() outputs
> "[KeyValuePair("myname", ""), KeyValuePair("myaddress", ""),
> KeyValuePair("mybutton", "DontClickMe!!!")]"
>
> And on a browser(FF), the url would be something like ->
> http://localhost:8080/QS/thanks.html?myname=&myaddress=&mysubmit=ClickMe%2
> 1%21%21
>
> I am running into some kind of a stored procedure on the server side,
> which throws up an error page whenever it sees the button names and
> values in the parameter string.
> Regards
> Vinay
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: InterSystems CACHE
> FREE OODBMS DOWNLOAD - A multidimensional database that combines
> robust object and relational technologies, making it a perfect match
> for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
> _______________________________________________
> Htmlunit-user mailing list
> Htm...@li...
> https://lists.sourceforge.net/lists/listinfo/htmlunit-user
|