Cross domain load request
2 posters
Page 1 of 1
Cross domain load request
Hello mates
I would like to load on my forum portal (in a widget for example) a div class of another page
for example I want to load on my forum the elements div.listing li from a page www.domain.com/hello, that is different from my domain (so i cannot use .load()
What can I do?
I would like to load on my forum portal (in a widget for example) a div class of another page
for example I want to load on my forum the elements div.listing li from a page www.domain.com/hello, that is different from my domain (so i cannot use .load()
What can I do?
Re: Cross domain load request
.load not allow to loading elements other domain..
trying $.get() or $.ajax()
trying $.get() or $.ajax()
Re: Cross domain load request
yes, I know I should use ajax, but I cannot understand how to set up the code
Re: Cross domain load request
Try:
api.jquery.com/jQuery.getJSON/
api.jquery.com/jQuery.Ajax/
Please not ads
api.jquery.com/jQuery.getJSON/
api.jquery.com/jQuery.Ajax/
Please not ads
Re: Cross domain load request
actually i know I have to use ajax.. but I don't understand how to set it....
Re: Cross domain load request
An exemple ofer by api.
HTML:
JS:
Initialize resource of external pages.
HTML:
- Code:
<div id="images"></div>
JS:
Initialize resource of external pages.
- Code:
(function() {
var flickerAPI = "//api.flickr.com/services/feeds/photos_public.gne?jsoncallback=?"; // External link
// Initialize
$.getJSON( flickerAPI, {
tags: "mount rainier",
tagmode: "any",
format: "json"
})
.done(function( data ) {
$.each( data.items, function( i, item ) {
$( "<img>" ).attr( "src", item.media.m ).appendTo( "#images" );
if ( i === 3 ) {
return false;
}
});
});
})();
Similar topics
» American Red Cross Club flash banner request
» Request to cancel Domain name
» Domain forwarding request
» Request for domain name went wrong
» Request domain Selamba.my
» Request to cancel Domain name
» Domain forwarding request
» Request for domain name went wrong
» Request domain Selamba.my
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum