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/
Related
I am developing a project with NextJs. The project is an editor application. That's why I want the page(editor) not to work when they save the page differently. For example Youtube, Instagram etc. applications do not work when the page is saved as. How do they do this? And what approach should I take ?
The editor should not work when the page is saved as different. So I can use this project commercially.
Youtube and Instagram work fine after saving, you just need a server to serve the files
Nothing you can do to prevent this
I'm writting a simply HTML5 file which I want to use locally in order to get access to and display different HTML5 documents with educational information.
In short: I have some different word documents with my personal summaries (college, courses, notes, etc) that I've been developing through years and now I'm looking to develop that browser application with which I'd like to be able to navigate through these word documents (previously converted into HTML5 format).
That browser application would be an index.html page with a navbar menu (let's say) with different links which will display in the index.html (inside a specific div) the different HTML5 files (remmember that word documents previously converted).
Since I do not want to use any server (I want to execute my application in any computer, offline) I tried using jQuery load() function as it's shown:
$("button").click(function(){
$("#content").load('/pages/example2');
});
It works fine in a server but does not without server.
Is there anyway to do what I want to? Am I missing something?
Thanks in advance for your attention.
Please, keep in mind I'm not a professional developer and this is my first post in a develop forum.
Kind regards.
I'm trying to develop an offline android app using simple html, css and javascript. I use website2apk software to convert the local html files to a standalone apk file.
My app contains a tariff of some random products. What i need is to notify (in-app notification) my app user if there is any update to the app.
For example, when user get connected to internet the app should automatically check for updates and if there is any update available, a warning should appear on top of the home page which says "New Update Available" which will be linked to mysite.com/newversion.apk .
Can someone suggest me what to do for this?. I can only depend Webview and pure javascript, which means no jquery.
I'm sorry for my bad English. Thanks in advance.
The site which hosts your apk should have an api so you can check from your app if there is any newer version available.
A possible solution would be to add a file (for example a json file) which contains the actual version of your app. Then you can make a web request in your app to get the file data.
Example:
get 'http://www.yourwebsite.com/appversion.json'
I'm currently working on an application that uses the Phonegap/Cordova framework to display an online and an offline version of a website. If you're not familiar w/ this framework, it offers a simple way of creating multi-platform applications by displaying local files in a full-screen webview.
When launching the application, the Javascript integrated in the local files of the application detects if Internet access if available, and redirects the user to either another local webpage containing a full-screen iFrame of the live website, or a reduced offline version of the website (contained in the local files of the app) if no Internet connection is detected.
I would like to detect when the user logs in using the various forms on the website (being displayed inside the iFrame), but I have no way of knowing which page the user is on, or interact w/ the website content at all because of the same-origin policy.
Would it be possible though to make the Javascript from the local page (which contains the iFrame) interact w/ the Javascript from the remote page (which is being displayed in the iFrame)? This way, I would be able to obtain the login information, and save it for later use (obviously not w/o using a token system), but also it would help for another planned feature (trigger the guidance system).
Thank you.
Look into HTML5 communication, it's pretty simple and sounds like it fits your needs
http://stevehanov.ca/blog/index.php?id=109
https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage
I'll try to make a my website app, in relaty I need a top menu with some features and on the main frame I would like to see the web site, BUT I have to pharse the code for:
Create the menu in top menu with some other features
Take only the part that interests me
I don't care if I loose the original page format, I would like to parshe the original html code and work it
I tried InAppBrowser but it open the browser....I look some JSON translating but it's just for fun, I would not like spend 30$ :(
The site is made in joomla
Ideas?
Cordova isn't designed to directly load content from a website as a page.
You may be able to build a simple jQuery AJAX request for each page you want to show and then extract pieces of the resulting document.
Alternately, you could use a back-end plugin for Joomla that allows you to interface with the data from the website and then display it in an app you build using Cordova.
You could use Cordova to create a webview based app that builds the menu HTML / CSS / JS in the app on the device then for each section in the menu renders some of the content from your website inside another div in your webview and apply styles to that locally in the Cordova app. This would however make your app dependent the network to get to your website so you may also wish to consider caching content in the Cordova app for a period of time.
Ideally you would use Ajax requests back to the Joomla CMS and get the content through a JSON or XML (if you must) API then render it in the Cordova client using the Javascript framework of your choice.