I have a dropdown like this:
<form action="" id="myForm" method="post">
<select id="choose">
<option value="test1">Test1</option>
<option value="test2">Test2</option>
<option value="test3">Test3</option>
</select>
I use this script to call another page, and load the data in div UPDATE:
<div id="update"></div>
<script type="text/javascript">
$(document).ready(function () {
var datum = $('#choose option:selected').text();
$("#choose").on("change", function () {
$("#update").load("boekingstap0_inlay.php?zipcodeFrom=<?php echo $_POST['zipcodeFrom']; ?>&date="+datum);
});
});
When I change the dropdown, the returned value stays "test1". The page does reload, I put an Alert message on the page to be loaded, which echoës the value $_GET['date'].
What am I doin' wrong?