I want to modify the URL query string before submitting the form. I'm having a form like below:
<form name="sampleForm" id="sampleForm" method="get" action="/detailVal" style="display:inline">
<input type="hidden" name="cId" value="${lId}"/>
<input type="hidden" name="sId" value="${sId}"/>
<input type="hidden" name="pKey" value="${pKey}"/>
onclick="return resetPage('sampleForm',)"><img height="40" width="30" src="/img/next123.png"/></a>
</form>
<script type="text/javascript">
function resetPage(formName) {
var thisForm = doc
}
</script>
Before submitting the form I want to change the URL from /detailVal?cId=1&sId=2&pKey=3
to /detailVal/cId/1/sId=2/pKey/