Page 1 of 1

Problem with Page show & load page events

Posted: Sun Mar 16, 2014 12:43 pm
by Bob Fludder

Problem with Page show & load page events. I added an alert statement & console.logs as steps in both page show & load page but they don't fire. Even if I insert a console.log into a script I'm almost sure runs (I'm doubting myself now) nothing happens. I did change the project source (I noticed the js editor was complaining about missing ";" and some that had too many ";" so I fixed that in there.) but not sure if related. Any ideas ?


Problem with Page show & load page events

Posted: Sun Mar 16, 2014 1:45 pm
by Igor

Hello,

Sometimes JS code don't fire because there is JS error. Please check browser console are there any errors? If there is no any errors, please post app publick link.


Problem with Page show & load page events

Posted: Sun Mar 16, 2014 10:11 pm
by Bob Fludder

No js errors showing in console. Here's the link http://appery.io/app/mobile-frame?src...


Problem with Page show & load page events

Posted: Sun Mar 16, 2014 11:53 pm
by Bob Fludder

It appears as though if I add an event its being ignored but if I change some javascript that is already in the list of events it runs


Problem with Page show & load page events

Posted: Mon Mar 17, 2014 12:44 am
by Alena Prykhodko

Hi Bob.

It's hard to say what's wrong.
Please share your application with a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a, tell its name and steps to test so we will take a look.


Problem with Page show & load page events

Posted: Mon Mar 17, 2014 1:09 am
by Bob Fludder

OK. Is now shared. Name is "Call Sheets". The first screen asks for user name & password. Use user = bobf, p/w = abcd1234. You'll see it stays on that page. When you click on "Log In" (or press enter) it should run a service called serviceLogin. That in turn when complete runs some javascript. The first line in that is an alert saying "service login complete". Further down the same script it runs a function called doAPP. I've changed this to do an alert saying "running log in". This one shows... the other doesn't...


Problem with Page show & load page events

Posted: Mon Mar 17, 2014 2:17 am
by Alena Prykhodko

Dear Bob.

As we can see you have changed login.js file on the Sources tab

Please follow next document:

http://docs.appery.io/tutorials/sourc...
pre
It’s important to remember that if you try to make any changes in the visual builder after you have edited the source, the changes won’t be seen./pre

That's why you didn't have changes when you change js in editor.

To fix :

In "WEB_RESOURCES" delete login.js, and for this folder select "Undo all souce changes"

Note: after this processing all change you have done in this file would be canceled.
Please read more about editing Sources in the doc above.


Problem with Page show & load page events

Posted: Mon Mar 17, 2014 2:19 am
by Bob Fludder

OK. Thanks.Thought it was something stupid I did