I am wanting to write a small application that can pull RSS feeds from any RSS feed url. if anyone could give me very basic help on how to achieve this?
im only really starting out in the world on AJAX and this kinda stuff so any help would be appreciated.
Thanks
EDIT :- I am only trying to do this with Jquery and Ajax, I dont want to use PHP or any other server side code.
You want to first create an interface in HTML that allows one to read and subscribe to RSS feeds. You also need to find a way to store the RSS feeds subscribed.
Then you want to use AJAX to get the remote document. I assume you're doing this in jQuery as your tag indicate it does, so you can refer to this: http://api.jquery.com/jQuery.ajax/
Then, you need to parse the XML that's returned. Check out a RSS tutorial -> http://www.w3schools.com/rss/default.asp and use the jQuery library to parse the data (HTML is kinda like XML, so the jQuery methods still works for XML/RSS) -> http://think2loud.com/reading-xml-with-jquery/
Lastly. Display your data by constructing your interface with JavaScript.
Related
I have to add a button to fetch from my azure function by sending JSON GET call on an HTML page and I am new to this. Could you please give me some code examples that can help me understand this?
I am completely new to this so I need little help with this to begin I just made a webpage using html5 and I am confused after that. I just need a little example of how can I use JSON get to fetch something from my azure function.
I'm implementing a small image uploading function in my web page, nothing too fancy, and to that end, I think vgy.me is a good tool. From what I understand, we can upload an image to the site via a POST method in a form. It returns a JSON response for every image uploaded, which contains a link to the image among other things (important because I intend to use that link for future purposes). There's even a helpful little example of the same on its API page (link).
My question is, how can I get that JSON response for my use using vanilla JavaScript? My initial searches have turned out techniques which pertain to server-side, which obviously I can't implement because it isn't my server I'm using. Is there a way to use the default POST method of HTML to get the JSON value, or perhaps I've misinterpreted the instructions?
I'm not using the jQuery code given on the page, because I've no knowledge of any JavaScript framework, and I'd rather not simply copy and paste if I could help it.
I am developing my first website. At this time i am generating a new html design that would be a ticket.
From my main page, i will load this html when the user clicks the "See ticket" button. This html has a table which is filled on document.ready with javascript. The data used is a JSON created in the main page.
I coded a working solution using localStorage. The problem is that the next step is to convert that HTML website to PDF and the software i am using does not work properly with localStorage, so i need to pass the JSON from main page to the ticket page. I can't neither use URL encoding cause string could be sometimes longer than 2000 characters and it is not productive.
So i thought that maybe i could do and $.get call from the ticket.html to index.html and get the needed JSON. Is this approach correct, or is there any better solution?
Regards
As suggested earlier comments, you need to use serverside code to accept post params and you need to do a ajax post to send the data. This is very good approach. I have one more idea for implementing this.
Let say you open ticket.html in a window.open. And have a JS function ( say GetValue) in index.html, that returns JSON . So you need to get JSON in ticket.html.
You need to define a JS function in ticket.html , using windown.opener.GetValue() , you can get JSON value.
Hope, i am in same direction, which you need. If not, please clarify.
Other way, would be use iFrame and use message communication to pass large data between them, you are interested in this, please read this - https://developer.mozilla.org/en-US/docs/Web/API/Window.postMessage
I'm new to Blogger and its JSON API. I've found out I can retrieve all posts / retrieve specific post using post id.
I'm trying to build a lazy loading blogger post list page, where blog content needs to fetch dynamically. What is the best way to retrieve latest 5 posts in every request? (I don't want to request 5 times for 5 posts)
Another thing is, I want to show post's first image on post list page. How can I fetch the first image and fetch textual content only?
I've searched Google but couldn't find any good tutorial. I hope you guys can help me.
Cheers
One option is to use javascript callbacks , for example :
http://jayunit100.blogspot.com/feeds/posts/default?alt=json-in-script&callback=myFunc
This will return back a peice of executable javascript code which
1) Calls a function which you defined
2) Sends that function a json object
The below is my speculation on this matter, because it clearly is much more difficult than one might think it should be:
It is not clear to me why a simpler, pure, authentication-free JSON REST api is not available (maybe one does exist), which simply takes a blog id and returns pure text, however, I suspect it might be that blogger wants to discourage crawling.
http://blogname.blogspot.com/feeds/posts/default?alt=json
Replace blogname with you Blogname.
You will get JSON Object and use JSON FORMATTER to format the JSON.
How would I access a mediarss tag like <media:thumbnail> using basic javascript like getElementsByTagName? P.S I do not want to use a library or server side scripting, also a json object is not available from the rss feed i am using, and i do not want to create one in php...
It seems this issue is covered here, where they talk about using getElementsByTagNameNS.