This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
I am using struts2 framework in my application, I have one button on my jsp page. That is
<s:submit type="button" name="btnSave" />
Now i want this button to behave as normal HTML button type should not submit the form and execute the Scripting
function on onclick event. That function submit the form using ajax.
But what happens is struts2 convert it to
<input type="submit" id="add_btnSave" name="btnSave" value="Save"/>
And my form is submitted.
1)If I use the HTML button tag it will mess the GUI. As theme of my form is ajax.