Reputation: 3
I'm refreshing a div on menu selection -it reloads a php include. The issue - the php include has a script that is submitting a GET request to JSON in some data from yet another form.
the headers show it is sending the proper headers to the first form, the second form is a user input behind
Header results:
MIME Type: application/x-www-form-urlencoded; charset=UTF-8
location: 1
the chained file is getting this:
calDemo/data/api.php?location=
If I use the select menu again I get this result:
MIME Type: application/x-www-form-urlencoded; charset=UTF-8
location: 5
And
calDemo/data/api.php?location=1
next would be
location: 3
calDemo/data/api.php?location=5
if I continue to increment the menu, they are always one input off. The data in the div reloads and shows me the content, it's just from the selection before the currently selected.
$('#locationID').change(function(event) {
$.post('calDemo/miniCal.php', { location: $('#locationID').val() },
function(data) {
$('#scheduleReload').html(data);
}
);
});
and
scheduler.load("calDemo/data/api.php?location=<? echo $location ?>");
var dp = new dataProcessor("calDemo/data/api.php?location=<? echo $location ?>");
dp.init(scheduler);
dp.setTransactionMode("JSON");
Upvotes: 0
Views: 51