Page 1 of 1

Linking existing HTML5 content with button click event

Posted: Wed Feb 19, 2014 11:04 pm
by Krishna Misra

I am new to appery. I have my own HTML5 content and I want to upload the content to some folder and invoke the index.html file of my HTML5 application from the click event of a button on the startScreen. Can you help with this?


Linking existing HTML5 content with button click event

Posted: Wed Feb 19, 2014 11:37 pm
by Alena Prykhodko

Hi,

Copy your HTML5 content to HTML component, then on Click event Run JS:

preAppery("html_X").submit();/pre

html_X - your HTML component name

More here http://docs.appery.io/documentation/u...


Linking existing HTML5 content with button click event

Posted: Wed Feb 19, 2014 11:43 pm
by Krishna Misra

Thanks, I will try this. Additionally I observed below problem after trying so many times:-
1) I added a button to startSreen.
2) Created another page.
3) Linked this new page to the button on click event.
4) (Issue) When I run the application, it does go to the new page but it is not showing the updated page. I mean change the caption of the new page and added a button also. However when I navigate from the button on the start screen, I see the old page only(with default text 'caption' on the top) and button is also missing.


Linking existing HTML5 content with button click event

Posted: Thu Feb 20, 2014 6:41 pm
by Maryna Brodina

Hello!
1) Refresh the page Ctrl+F5, perhaps data is cashed
2) Di you change anything on Source tab?


Linking existing HTML5 content with button click event

Posted: Thu Feb 20, 2014 11:00 pm
by Krishna Misra

Hi Marnya,
I was able to get this done by linking page from a button. Now I have different problem. I have an HTML5 application of my own which I want to link to an appery page. Here is what I did:-
1) I have created a button on startScreen and created a button on that.
2) Then I created a new page(let's call abc) and dropped an HTML component on that. Inside that HTML component I have pasted the HTML of the index.html of my own application and set the width/height as 100%(so that it comes fullscreen).
3) From the startScreen's Button's onClick event I am trying to invoke the new page 'abc'.
4) Here is the problem. I just get the loading icon and the 2nd page never invokes.
Please note that my HTML5 app is generated from ispring's Powerpoint to HTML5 converter.


Linking existing HTML5 content with button click event

Posted: Thu Feb 20, 2014 11:16 pm
by Illya Stepanov

Hi Krishna - can you show how exactly you insert code inside your HTML component?


Linking existing HTML5 content with button click event

Posted: Fri Feb 21, 2014 10:35 am
by Kateryna Grynko

Hi Krishna,

Most probably you entered an incorrect code there.

If you really need your page to be here - you can change its sources. But I'd recommend you to use HTML component.

Please check if there are any console errors.