javascript - jQuery's get() function not working -


i wrote .cgi file hardware information , now, information html page in same domain jquery's get() function. tried this piece of code :

var cgicontent = '';  $.get("http://localhost/cgi-bin/cpu.cgi", function(data) {        cgicontent = data; }); 

but doesn't work , have no idea why... when @ firefox's debugger, cgicontent = '' , data still undefined.

i'm new here, please tell me if need more information answer me.

best regards, nittak

this same origin problem (sop) problem. firefox may show 200, while still failing content due sop.
since (you claim) on same domain, omit protocol , domain name , write $.get("cgi-bin/cpu.cgi" , see if works that.

also add console.log success function see if executed.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -