2017년 6월 1일 목요일

HTML generation from Button Click event


I would like to generate a HTML file for my App I create using MIT App Inventor2.
I am looking at the code right now and wondering if I could call a HTML Generation function from the Event Listener of a button, would that work?
Where do I call my HTML Generation function in the code for that to happen?

Can anyone help? Thanks in advance?

--
You can read an html file with AI2 but you can not "generate" a html.  You can write and make the html (it is essentially a fancy text file) manually but this is not really practical inputting text with a phone or tablet on screen keypad..

--
Is it possible to replace source within the existing html with button click

--
I do not know Richard.   This post by Taifun seems to say he thinks it is possible to modify an existing html, however it does not provide any detail: Programmatically generating HTML using AI2 and presenting it via Webviewer  
I have not attempted this.  

Here are some things that I know can be done:

http://puravidaapps.com/table.php

table3.aia

http://puravidaapps.com/snippets.php#2webviewstring

webviewstring.aia

so if the html is structured correctly, you can post data and get a return.

Check it out, try some things and lets us know what you discover.

--
I would like to generate a HTML file for my App I create using MIT App Inventor2.
you can use the File component to store some text in a text file on sd card, and a html file is a text file, isn't it? Then you can use the webviewer to display that html file


alternatively you can pass html snippets via the webviewstring property to the webviewer, see here 


--


댓글 없음:

댓글 쓰기