I'm wondering why my form doesn't redirect to the chosen link using POST request and how to fix that?
In general what i'm planing to do is to prevent to access those links directly so i'm planing to check for the Request method if it wasn't POST then i will do a redirect, but my only problem at the moment is to access those links via that form using POST.
<div class="marketplace_div">
<form id="dropdownredirect" name="dropdownredirect" method="post">
<select class="marketplace_list" id="dropdownredirectselect">
<option value="geschenkformular/">Amazon Germany</option>
<option value="gift-form/">Amazon UK</option>
<option value="gift-form/">Amazon France</option>
<option value="gift-form/">Amazon Italy</option>
<option value="gift-form/">Amazon Spain</option>
</select>
<br>
<input class="marketplace_submit" name="submit" type="submit" value="Weiter / Submit" />
</form>
</div>
<script type="text/javascript">
jQuery(document).ready(function() {
jQuery('#dropdownredirect').submit(function (event) {
event.preventDefault();
window.location = jQuery('#dropdownredirectselect').val();
});
});
</script>
Thanks