Page 1 of 1

How to save a single item (image with name @url) from an RSS feed into local storage to show individually in a new page

Posted: Fri May 22, 2015 2:31 pm
by Nancy

I have everything working and mapped correctly except for the Image URL. This item is in a separate folder called "content" and the item itself is named "@url" which came directly from my RESPONSE. How do I adjust my JavaScript line 6 code to account for this? The other items are working correctly, but they're not within a separate folder.

I know this is an easy answer for someone, but I've tried numerous variations to no avail. Your help is much appreciated!

Thank you.

Image

Image


How to save a single item (image with name @url) from an RSS feed into local storage to show individually in a new page

Posted: Fri May 22, 2015 6:30 pm
by Serhii Kulibaba

Hello Nancy,

It isn't correct to use click event for saving data from response. If you need such data on click event - please write all of them to element's attributes:

element.attr('data-title', value.title);
...
and so on.

And read them on the click event:

https://devcenter.appery.io/documenta...

You can get @url parameter this way:

var url = value.content["@url"];


How to save a single item (image with name @url) from an RSS feed into local storage to show individually in a new page

Posted: Fri May 22, 2015 7:00 pm
by Nancy

Thank you. That worked, now I'll just adjust the code like you suggested.