jQuery load() not working with http but does with local file -
i have simple function:
function gocv(what){ //'what' = htm filename $('#cv_load_entry').load("http://<domain_name>/" + what); } the function works fine when file local (with relative reference on machine or in same directory link-from file on server). when attempt use absolute reference (with http://domain_name/filename.htm), not work; , firebug displays in red (but doesn't tell me problem can recognize reading headers).
when view successful information in firebug when executing script server using relative referencing, shows full url sent "http" part pre-pended filename variable.
i'm stumped.
ps: i'm using http://code.jquery.com/jquery-latest.js
update: i'm suspecting cross-domain issue. i'm going try proxy.php idea found on why doesn't jquery .load() load text file external website?
problem solved: http://christianheilmann.com/2010/01/10/loading-external-content-with-ajax-using-jquery-and-yql/
most cross-domain issue (you can test changing domain same 1 webpage on; script should start working). if control remote server, or if supports remote ajax requests, can use either cors or jsonp access data. otherwise, need proxy.
Comments
Post a Comment