Page 1 of 1

Grab external web page, interrogate HTML from project Javascript - Possible?

Posted: Fri Apr 26, 2013 11:07 am
by Andy Parker

I have an app that needs to grab an external HTML Web page, interrogate the HTML and report on items within the HTML.

Is this possible in Tiggzi? I dont want the page displayed, just accessible to my project javascript.
If so, can you let me know how to do this please?

regards

Andy


Grab external web page, interrogate HTML from project Javascript - Possible?

Posted: Fri Apr 26, 2013 1:36 pm
by Maryna Brodina

Hello! Working on it.


Grab external web page, interrogate HTML from project Javascript - Possible?

Posted: Fri Apr 26, 2013 2:56 pm
by Kateryna Grynko

Hi Andy,

We support only Rest Services with Content Type = XML or JSON. You can't get content of another page using JavaScript due to browser security restrictions (http://en.wikipedia.org/wiki/Same_ori...). To use data from other sites on Appery page you should create Rest Service that will interrogate web pages and send XML or JSON data to Appery.


Grab external web page, interrogate HTML from project Javascript - Possible?

Posted: Fri Apr 26, 2013 3:22 pm
by Andy Parker

ok, understood, thanks for that.


Grab external web page, interrogate HTML from project Javascript - Possible?

Posted: Fri Apr 26, 2013 3:41 pm
by Kateryna Grynko

There is a workaround.

You would need to create Rest Service with URL points to Web page. After adding Rest service on Complete event add Run JavaScript action. Page HTML content will be stored in this Action in string variable jqXHR.responseText. You will be able to get data from the HTML code using JavaScript.


Grab external web page, interrogate HTML from project Javascript - Possible?

Posted: Thu May 09, 2013 11:37 am
by Andy Parker

Hi Katya,

I'm really struggling to get this working.

I've added a REST service, and set the URL to the page I want to capture.
Method is GET, Data Type is XML (not sure if thats right).
I don't know what to add as the response code/data?

Can you expand more on the workaround you mentioned please?