zeby ten obrazek sie zmienil bez przeladowania strony i zeby to pozostało na serwerze, czyli musze chyba uzyc ajax...
Stosowalem takie cos:
CODE
function myAjax() {
$.ajax({
type: "POST",
url: 'your_url/ajax.php',
data:{action:'call_this'},
success:function(html) {
alert(html);
}
});
}
$.ajax({
type: "POST",
url: 'your_url/ajax.php',
data:{action:'call_this'},
success:function(html) {
alert(html);
}
});
}
W html:
CODE
<a href="" onclick="myAjax()">Zmiana</a>
i w ajax.php
CODE
if($_POST['action'] == 'call_this') {
// funkcja zmiany obrazka
}
// funkcja zmiany obrazka
}
ale nie wychodzi, ktos wie jak to rozwiazać?