Reputation: 83
i tried many topics but i didn't get any result.
by this code:
<script>
function url(){
$(document).ajaxStart(function(){
$("#loading").show();
}).ajaxStop(function(){
$("#loading").hide();
}).ajaxError(function(){
alert("error on load page!");
});
$("#div1").load("ajax_load.asp #page");
};
</script>
when the page load, the scripts didn't load. how can i fix this code? i try many codes and tips but all of them didn't work.
any idea's? sorry for my bad english!
Upvotes: 0
Views: 139
Reputation: 6612
Remove space between ajax_load.asp #page
like this ajax_load.asp#page
and you also need to call the url()
function
Try below code:
<script>
function url(){
$(document).ajaxStart(function(){
$("#loading").show();
}).ajaxStop(function(){
$("#loading").hide();
}).ajaxError(function(){
alert("error on load page!");
});
$("#div1").load("ajax_load.asp#page");
};
url();
</script>
Upvotes: 1