↧
+++ Rick ---
I will look into adding support for JSONP.
Thanks.
AJAX calls don't work cross domain. XHR requests are restricted by browser policy to not work across domains so if your domain is not identical it won't work.
You can use JSONP to return data cross site though:
http://www.west-wind.com/weblog/posts/2007/Jul/04/JSONP-for-crosssite-Callbacks
+++ Rick ---
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html lang="en-US"> <head> <script src="/wconnect/Scripts/jquery.min.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function () { alert('json call'); $.getJSON('acewareuniversity.com/wconnect/awJSON.awp?&Host=EXT&target=:DATAPATH\zip.dbf;zipcity,zipstate;zipstate=[KS]',function (xObj) { alert('result received'); }) }) </script> </head> <body> <h1>Test of awJSON</h1> <a href='acewareuniversity.com/wconnect/awJSON.awp?&Host=EXT&target=:DATAPATH\zip.dbf;zipcity,zipstate;zipstate=[KS]'>Show JSON</a> </body> </html>
If I point the same call against my localhost app it works fine.
Would appreciate any help figuring out what could be wrong here...
--stein
FYI, those links will only work from authorized clients, so don't try to test the page from your system.