Skip to content Skip to sidebar Skip to footer

Call PHP Function In Ajax

My problem is the following: I have a real simple PHP file called 'writeSettings2.php' that has:

Solution 1:

Your browser is caching the ajax response. You need to add a random value to the ajax request, or put the no-cache header in the called page. You can change the javascript like so to fix it:

var str = selObj.options[selIndex].text+'&random='+(new Date()).getTime();

And/Or use the following php header:

header("Cache-control: no-cache");

Post a Comment for "Call PHP Function In Ajax"