Page 1 of 1

Events do not fire in page that is not the starting page

Posted: Wed Oct 02, 2013 11:02 am
by Benny Halperin

I have 2 pages in my app, and I added a couple of events to the page that is not my starting page. I load my 2nd page by means of code<a href="2ndpage&#46;html">/code

The events are page load, and a click event on a button that I have on this page.

Any ideas?


Events do not fire in page that is not the starting page

Posted: Wed Oct 02, 2013 11:10 am
by Kateryna Grynko

Hi Benny,

Could you please clarify, is the 2nd page loaded successfully? Are there any errors in console?
You can try the following code for navigation: http://docs.appery.io/javascript-api/...


Events do not fire in page that is not the starting page

Posted: Wed Oct 02, 2013 11:14 am
by Benny Halperin

Hi Katya,

The 2nd page loads. I see the page components, but no events fire and no error messages in the console.

I prefer to avoid using Appery code for navigation. I do it the standard simple href way.

Where is my custom event handling code stored?

Benny


Events do not fire in page that is not the starting page

Posted: Wed Oct 02, 2013 11:50 am
by Kateryna Grynko

Hi Benny,

Could you please just try Appery.io code and tell us if it works for you?


Events do not fire in page that is not the starting page

Posted: Wed Oct 02, 2013 11:58 am
by Benny Halperin

I suspect that the accompanying js (2ndpage.js) has been accidentally touched manually, and since then events I add via events panel are not saved (this is not a 2-way street). Is it true that once edited (blue) they can't be updated? And if so, I think the user should be warned. In practice, Appery behaves as if the event handler is saved, but it's not!


Events do not fire in page that is not the starting page

Posted: Wed Oct 02, 2013 12:50 pm
by Kateryna Grynko

Hi Benny,

Yes, if you change the code manually, this page is no longer editable. You can roll back your changes by deleting the file, and then clicking 'Undo all source changes':
http://docs.appery.io/tutorials/sourc...