+ 1
External websites data
How can I use data from external websites as functions parameters for my javascript codes? Do I have to write them manually or there's a way to make js doing it?
4 Respuestas
+ 1
Alessandro Palazzolo Ok, you have to extract data... If your data is in a format like json/xml, your can easly obtain they, but if you have to extract data from an html page you have to parse it using js. With this, you cannot update your data in automatic way when target page is updated.
Maybe you can also load the target page in an iframe for parsing and for iniect some code that handle updates on target webpage (the iframe) and "send" they on your page (the page container of iframe), but i never tried.
Anyway take cure that your target page have enable cross-origin response else you cannot load it neither in iframe or with ajax loading
0
Alessandro Palazzolo Do you mean parse data from an external web page?
0
ajax and json
0
KrOW I mean like I have some informations about something in a website and I want to make, for example, an if statement in my codes based on the informations from that website. Do I have to write down manually the informations or there's a way to put them automatically in my codes so that when they change in the website they change also in my code?