I want to insert some stuff generated by a PHP code into my HTML document, because I can't use innerHTML with .php extension, but I need that for some ajax. I tried jquery .load() and get(), but I can't get that to work, I'm not really a jquery guy:D
$.get("diaknev.php", function(data) {
$('#sajt').html(data);
});
Use an absolute path for the URL:
$.get("/absolute/location/of/diaknev.php", function(data) {
$('#sajt').html(data);
});
Use WebDeveloper Tools in your browser (F12 in IE) to track the HTTP and see what happens on the wire.
PS: Consider using $.ajax
directly and set dataType
to 'text'
.