javascript - Using a JS and JSP function in submit form -
i have js function
the function returns "/outstanding-appeals-nonstop16/insertform"
function access(){ <% string insert = request.getparameter("insert"); %> var insert2="<%=insert%>"; return ("/outstanding-appeals-nonstop16/" + insert2 + "/"); }
in form have
<form:form commandname = "anewform" action = "javascript:access()" method ="post"> </form:form>
insertform
method in controller. if put action = "/outstanding-appeals-nonstop16/insertform"
result looking for. think action calling js function instead of value given js function.
of course does. either input /outstanding-appeals-nonstop16/insertform in action attribute:
<form:form commandname = "anewform" action = "/outstanding-appeals-nonstop16/<%=insert%>" method ="post">
or perform form submit programmatically in js function.
Comments
Post a Comment