I have Ajax function
function getOutput()
{
var ajax = getRequest();
document.getElementById('output').innerHTML = "<br/>";
ajax.onreadystatechange = function()
{
if(ajax.readyState == 4)
{
document.getElementById('output').innerHTML = ajax.responseText;
}
}
document.getElementById('output').innerHTML = "<br/><img src=img/ajax-loader.gif><br/><br/>";
ajax.open("GET", "graph_2.php", true);
ajax.send(null);
}
HTML
<form >
<input type="image" src=img/button.jpg class=mygtukas
onclick='getOutput(); return false;'>
</form>
<span id=output></span>
which calls PHP code to create a graph. First time it works fine, but when a user changes graph parameters and press a button again (page doesn't reload) it shows the old graph even dough there is new graph created and saved in server.