I have a form like this:
<form action="studyresults.show" method="POST">
...
...
<div style="clear: both;float: right;padding-top: 15px;padding-bottom:5px;">
<input id="submitButton" style="float:right;margin-top:-80px;" type="submit" class="btn btn-primary" value="Add" />
</div>
I want to add a parameter from url string like this:
<script>
function getQueryStringValue (key) {
return decodeURIComponent(window.location.search.replace(new RegExp("^(?:.*[&\\?]" + encodeURIComponent(key).replace(/[\.\+\*]/g, "\\$&") + "(?:\\=([^&]*))?)?.*$", "i"), "$1"));
}
</script>
I would like to query the url with "token" string so I can pass "token" as part of POST request parameter when I click submit button. How can I achieve this?