bahar.wadia
Posts: 0
Joined: Wed Aug 07, 2013 2:05 am

Load Event Random

I have two apps. Both apps open a Popup Screen. The first App is simple with just a few input fields, the second app has its fields populated by REST. In the second app, the input fields are populated each time the page show event is triggered. All this works fine.

I want to now, only populate the input fields in the second app when the page load event occurs not when the page show event occurs. I would expect that invoking the REST service through the Load event would accomplish this.

However, it appears that in the second app the Load event gets fired every time the popup is closed. This is not happening in the first app, which behaves as expected.

Can you please help me understand the behavior and how I can remedy the situation ?

Thanks

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Load Event Random

Hello Bahar,

Please tell steps to reproduce the second app.

bahar.wadia
Posts: 0
Joined: Wed Aug 07, 2013 2:05 am

Load Event Random

Not sure if I understand the question. I have been developing the second app for a few months.

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Load Event Random

Please clear up the part where you have question.
On what event do you open/close popup page?

bahar.wadia
Posts: 0
Joined: Wed Aug 07, 2013 2:05 am

Load Event Random

All I want is to prevent the Load event from occurring every time I return to the same page. I understand that the Load event must occur at least once, the first time the page loads correct ?

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Load Event Random

That's correct, load event is fired when the page is loaded into the DOM. You can do a check in load action (handler) and perform or not perform some action based on condition that you need.

bahar.wadia
Posts: 0
Joined: Wed Aug 07, 2013 2:05 am

Load Event Random

Maybe, I am not being clear with my question.

Why is it that all my pages in the application fire the Load event only once, the first time I navigate to it, while this particular page fires the Load event every time.

Does this help?

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Load Event Random

The events are fired by the browser. The load event is fired each time the page is loaded into the DOM. It's possible that in your app page load event is fired each time you navigate to the page. What kind of navigation do you use to get to that page?

Return to “Issues”