[jQuery] Re: $.post not load why?
Hi Mika, You could run a proxy script in server where Javascript is downloaded from. Simple proxy.php can be written with one line of PHP. ?php readfile($_GET['url']); ? Then instead of $(#remote).load(http://www.google.com/;) you would do $(#remote).load(http://www.example.com/proxy.php?url=http:// www.google.com/); Thanks a lot for your help! :) -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ It's easier to invent the future than to predict it. -- Alan Kay
[jQuery] Re: $.post not load why?
On Jun 4, 5:27 pm, Massimiliano Marini [EMAIL PROTECTED] wrote: I want to load news in my html page from a php script from another site. I have included this script in my html page, but not work, maybe I'm wrong using $.post? $(document).ready(function(){ $.post(http://www.othersite.it/news.php;, function(data){ $(#response).append(data).show('fast'); }); }); cross-domain problems set aside, you should not use post to get data. post is fur submitting data to a server.
[jQuery] Re: $.post not load why?
Massimiliano Marini ha scritto: I want to load news in my html page from a php script from another site. I have included this script in my html page, but not work, maybe I'm wrong using $.post? $(document).ready(function(){ $.post(http://www.othersite.it/news.php;, function(data){ $(#response).append(data).show('fast'); }); }); div id=response/div ajax can't work cross domain by design for security reasons. Renato
[jQuery] Re: $.post not load why?
ajax can't work cross domain by design for security reasons. There's no other method, workaround or something else? -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ It's easier to invent the future than to predict it. -- Alan Kay
[jQuery] Re: $.post not load why?
Depends on what you are trying to do, if you can run php on your server, you can pull in the external site and the use ajax to reference that php page. On 6/4/07, Massimiliano Marini [EMAIL PROTECTED] wrote: ajax can't work cross domain by design for security reasons. There's no other method, workaround or something else? -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ It's easier to invent the future than to predict it. -- Alan Kay -- Benjamin Sterling http://www.KenzoMedia.com http://www.KenzoHosting.com
[jQuery] Re: $.post not load why?
Depends on what you are trying to do, if you can run php on your server, you can pull in the external site and the use ajax to reference that php page. Not always php is present, I want to include a script and a div in html page, the script must populate the div querying a .php file in another server. Only this. I'm curious about your solution, how can I implement it? -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ It's easier to invent the future than to predict it. -- Alan Kay