Does dsp:input supports onclick?

236 Views Asked by At

I was trying to use dsp:input tag with type as button on an jsp page.

Does the dsp:input tag supports onclick function??

2

There are 2 best solutions below

2
hsz On

According to the documentation, no:

<dsp:input [type="input-control"] [name="input-name"]
   bean="property-spec" ["source-spec"]
   [checked="{true|false}"]
   [default="value"]
   [priority=integer-value]
/>

You can try to define your input with:

<dsp:input>
    <dsp:tagAttribute name="onclick" value="..." />
</dsp:input>
0
nsuriya239 On

As the dsp:input behaves as the normal HTML input control. It supports the **onclick** function too.