From: Vinay M. <vin...@gm...> - 2004-11-18 09:01:18
|
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%21%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 |