Laurie Harper wrote:
>
> zuban wrote:
>> It is working if I type manualy ExampleSubmit.do?method=delete
>> (The delete-method in the action-class ist calling)
>>
>> It is also working with this submit-button:
>> <html:submit property="method" value="delete"/>
>>
>> But why doesn't work <html:submit
>> onclick="this.form.method.value='delete'">
>> </html:submit> ?
>>
>> This should be the same like in this example:
>> http://struts.apache.org/1.x/struts-extras/dispatchValidator.html
>
> I don't see anything like your code on that page. Setting the form's
> method is not the same as passing a 'method' request parameter. What
> you're doing is telling the browser to make an HTTP DELETE request
> instead of a GET or POST. What are you trying to achieve by using the
> onclick handler?
>
I'd like to have a request-parameter named "method" and the value of
"method" should be set in dependence of the submit-button (if more then one
submit-buttons).
In other words the onclick-handler should set the request-paremter "method"
to a special value.
i.e. if I click on a "add-button" "method" will have the value "add" and if
I click on the "delete-button" "method" will have the value "delete".
--
View this message in context:
http://www.nabble.com/Trouble-with-DispatchAction-tf3696632.html#a10348496
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]