Get data from external websites using HTML5/JS for Android - javascript

I am new to HTML5/JS for Android. I was wondering if there is a way of pulling data from external sources (Just like simple html dom OR curl for PHP). Am trying to build an app which need to pull the news from other sources (like BBC etc).
I'll appreciate any idea, link,any available open source project.
Big Thanks.

Related

Can I open a code from Web Inspector through an IDE like WebStorm?

I would like to have a website code from Web Inspector (within Web Browser) downloaded as a folder in order to analyze it as a sample for my project. How could I do it? Thank you.
You will have to copy all the files manually if you want to use the web inspector, however there are tools like HTTrack that can help you crawl and retrieve the folders and source files of a web page and organize them nicely.
Remember that you can only retrieve client-side files like html, images, CSS, JavaScript and not server side like code. Also you should only use it for educational purposes and not for plagiarism.

Questions about turning the HTML code that uses Cytoscape.js into a web link accessible by other people

I am able to use the Cytoscape.js library to display a network graph on my own web browser. I wrote a HTML file containing the JavaScript code that takes in the graph JSON and style JSON files from my laptop and calls cytoscape(). When I run my HTML code on my laptop, the network graph is displayed on my own web browser and I can play with the graph.
Now I need to run the HTML code on our Linux server and then send a web link to the user, so that the user can click on that web link to view the displayed network graph on their own web browser, and the user should also be able to move nodes & edges around just as I did on my own web browser.
I am not a web developer so I am missing some very basic knowledge. I think I probably need to link the HTML code to a web domain (deploying the HTML code on a hosting server with domain name). I was just wondering if you could offer me some advice on how to do this?
Another question (which is more important) is: Assume I am able to link the HTML code to a web domain. When the user clicks on the web link to view the displayed network graph on their own web browser, is the user still able to move nodes & edges around?
The graph JSON and style JSON files and some additional JavaScript code the HTML loads in reside on our server. I am not sure if there are any issues about this when the user accesses the web link?
Any advice would be greatly appreciated.
Thank you very much in advance!
The question is too broad. You'd be best off searching for some books to read regarding web dev.
You might find using Github pages a bit easier than managing your own server, but you really should do some reading either way.
Basic resources to get started
https://developer.mozilla.org/en-US/docs/Web/Guide/Introduction_to_Web_development
https://developer.mozilla.org/en-US/docs/Learn/Server-side/First_steps/Introduction

download an entire directory in a phoneGap (iOS) from a server?

i Am struggling for a about 1.5 days trying to find a solution without success.
i want to download an entire directory that web content (images, html, js and css) to the persistent storage in an iOS PhoneGap app. I tried compressing the files into a single file and was able to download it to the persistent storage but i was not able to extract it. to extract the file i've tried multiple things none of them worked for me:
zip.js
archive.js
and phonegap-plugin-ExtractZip https://github.com/fiscal-cliff/phonegap-plugin-ExtractZip
does anyone have an example "unzip" function that i can use. or is there a better way to transfer a whole directory from a server to a phoneGap app?
(i am using cordova-3-3-0)
thanks in advance,
You need to develop app that integrate with restful service. You can download sample code from my github account.
https://github.com/datomnurdin/service-finder-mobile

HTML5 Mobile Web App

I've just created the required HTML5 Mobile web pages(including the CSS3 and javascript pages). I've got the apk file from build.phonegap.com as well.
But I want it to be dynamic i.e I should be able to add content from my laptop.
I've searched a lot but I'm unable to get the right info on doing this.
I just want to be adding simple text paragraphs from my local server(laptop) to the app on the go. What do I do ?
Sound like you need to set up some type of json / sql web service.
Use your machine's ip to do this.
Suppose your laptop ip is 192.168.1.1
Then from your application just use
http://192.168.1.1/your_appliction/webpage
replace http://localhost/ to http://10.0.2.2/
EDIT:
Treat your laptop as remote server and access the files in it as you normally do in website building.
From another post I think might help...
1- if you are building the whole site from scratch: You can create your site by any CMS like dotNetNuke or joomla which will allow you to login and edit what you want
2- if you are building just this page from scratch : You can build your page with online-editing in mind, in this case I recommend to build two pages one for for viewing content and the other for online-editing you can use any HTML-Editor control like FCKEditor
3- if you are dealing with already built page : it will be easier to build administration page which you can upload the new version of the content page to it, and the administration page take care of replacing the content page
Or maybe even the knockout js plugin could be something to look into http://jsfiddle.net/rniemeyer/LkqTU/

Open files from a web application with another web application?

So these days we want things to be on the cloud.
In the desktop area we could use one application to create a file, then another to open that file.
I wonder how you accomplish this file sharing between web applications?
Eg. if I create a web application letting the user create a file, how do I share this file to another web application for opening it? Maybe the user created a PDF file on my web application and when he clicks on it, I want this file to be opened using another web application - but is not mine - so that he doesn't need to download it to open it.
Is there a standard way of sharing files between web applications easily?
Im not asking about pure technologies that could make this possible eg. REST/json, but standard specification/implementation for sharing files between applications. Cause I haven't heard of this kind of implementation, which could be good for cloud services to eliminate the need of having to download everything.
Application A assigns an URL to the file, hands the URL over to application B and application B uses HTTP to retrieve the file via the URL. If both applications are running on the same server, this will be just as efficient as reading from a file from the file system, or from a database.

Categories