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

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -