Reputation: 341
I was wondering if the struts2 link (<s:a>
) could have the same behave of a submit button (<s:submit>
)?
Upvotes: 0
Views: 565
Reputation: 3005
<script type="text/javascript">
function logout() {
document.getElementById("form1").action = "checkliveuser?action=logout";
document.getElementById("form1").submit();
}
</script>
.
.
.
other HTML code
.
.
.
<s:form action="chkUser" method="post" id="form1" >
<s:a onclick="logout();" href="#" >Logout</s:a>
</s:form>
Upvotes: 1