javascript - Problem with loading content without refresh by .load() -
why after several times click on buttons, hang website? use of function .load() loading content(html). use of firebug solution problem did not succeed.
purpose buttons:
http://i.stack.imgur.com/elwxy.gif
you can see site : http://zigweb.ir/siran/
and can see js code address: http://zigweb.ir/siran/files/js/admin.js
$('#icon a').click(function (event) { event.preventdefault(); var id = '#' + this.id; var title = $(id).attr('title'); $(".title").toggleclass("suject").html(title); var url = $(id).attr('href'); $('.table_show, #num_count, #select_box, #input_search').fadeout('slow', function () { $('.results').load(url+' .load', function(){ $(this).hide().show(); $.getscript("http://zigweb.ir/siran/files/js/admin.js"); }) //.hide().show("slow") }); });
please tell me, do?
respect
that because of same-origin policy.
chrome inspector says,
xmlhttprequest cannot load http://localhost/test/1st.htm. origin http://zigweb.ir not allowed access-control-allow-origin.
to fix this, should change request url http://localhost
http://zigweb.ir
.
Comments
Post a Comment