Hello again guys, i'm trying to display a confirmation dialog once i submit a form. Everything seems to be working, except the most important thing: the dialog opens correctly, but the action of the form gets executed anyway every time. Here's my code
<s:form id="form" action="action">
<sj:dialog
id="confirmDia"
buttons="{
'OK':function(){okButton();},
'Cancel':function() {cancelButton();}
}"
autoOpen="false"
modal="true"
resizable="false"
>
Some Dialog text
</sj:dialog>
<sj:submit
targets="usersContent"
type="image"
value=""
cssClass="tableButton"
src="/image.png"
title="Some Title"
indicator="indicator"
openDialog="confirmDia"
></sj:submit>
<script type="text/javascript">
function okButton(){
$("#form%{#it.count}").submit();
};
function cancelButton(){
$("#confirmDia").dialog("close");
};
</script>
</s:form>