Note that there are some explanatory texts on larger screens.

plurals
  1. POGet images from rss on another domain(then append it)
    primarykey
    data
    text
    <p>I want to get images from a flickr rss but this code won't get them. This is what I got up with after some help from my original qustion here : <a href="https://stackoverflow.com/questions/4096515/jquery-in-internet-explorer-find-image-problemworks-in-ff-and-chrome">Jquery in Internet Explorer: find image problem(works in FF and Chrome)</a></p> <p>The problem is getting the data in right format to my web page. My page's URL is : zalastax.co.cc/pictures.html</p> <p>Javascript:</p> <pre><code>$.ajax({ type: "GET", url: "js/getflickreasy.php", dataType: "xml", success: function(data) { $(data).find("item").each(function() { var item = $(this), title, description, thumbnail; title = item.find("title").text(); description = item.find("description").text(); thumbnail = item.find("img").attr("src"); }); } }); </code></pre> <p>PHP:</p> <pre><code>&lt;? header("content-type: text/xml"); readfile("http://api.flickr.com/services/feeds/photos_public.gne?id=42980910@N02&amp;lang=en-us&amp;format=xml"); ?&gt; </code></pre> <p><strong>Edit:</strong> Mathews code works.<br> But I have a problem with appending some data.</p> <pre><code> var currentImage = 0; //get flicker images from rss. $.getJSON("http://api.flickr.com/services/feeds/photos_public.gne?id=42980910@N02&amp;lang=en-us&amp;format=json&amp;jsoncallback=?", function(data) { $(data.items).each(function() { var item = this, title, description, thumbnail; title = item.title; description = item.description; thumbnail = item.media.m; if (currentImage % 3 === 0) { $("#apa").append("&lt;p&gt;HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH&lt;/p&gt;"); } currentImage++; $("#apa").append("&lt;div id=\"div" + currentImage + "\" class=\"imageContainer pictDiv\"&gt;&lt;img id=\"img" + currentImage + "\" class=\"bild pictImg\" src=\"" + thumbnail + "\" /&gt;&lt;/div&gt;"); $("#bakgrund").append("&lt;img id=\"bkg" + currentImage + "\" class=\"bgrund pictBkg\" src=\"Bilder/polaroid.png\" /&gt;"); }); $("#bakgrund").append("&lt;img id=\"bkg" + currentImage + "\" class=\"bgrund pictBkg\" src=\"Bilder/polaroid.png\" /&gt;"); }); </code></pre> <p>This code works in Google Chrome. In Firefox it retrieves the data but don't do the append. If I try appending something else like simple text Firefox won't append that either.</p> <p>It works when I'm trying it via jsfiddle.net but it doesn't when trying it via my own webpage.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload