Sexycrets
Posts: 0
Joined: Thu Oct 03, 2013 3:06 am

Load event not firing in pages created from custom template

"Load" event fires just on template page, not on the page in the workarea. I need it to fire when the page is loaded (not the template) because the labels I want to map the data to are in the page. Any idea?

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

Load event not firing in pages created from custom template

The load even is fired once for the entire page when the page is loaded into the DOM. Is that what you see happens?

Sexycrets
Posts: 0
Joined: Thu Oct 03, 2013 3:06 am

Load event not firing in pages created from custom template

Thank you Max for the prompt reply!

My app has just two pages:
menu (one button)
showTip (two labels, based on the tipTemplate)

When you click the menu button it opens showTip. I want on the load event of it to send a REST request and map the response in the two labels.

The load event does not fire if I set it on the load of the page, just if I set it to the load of the template, but there I can't map the labels because they are not in the template.

Maybe my approach is not the proper one?

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

Load event not firing in pages created from custom template

Just to test, what if you don't use a template -- does the load even fire?

Sexycrets
Posts: 0
Joined: Thu Oct 03, 2013 3:06 am

Load event not firing in pages created from custom template

I tried from a fresh project and it worked, then I tried again on my project and now it works on the page inside the workarea too. Maybe I did something wrong somewhere else. Thank you so much for your help!!

Sexycrets
Posts: 0
Joined: Thu Oct 03, 2013 3:06 am

Load event not firing in pages created from custom template

Back to the beginning, I had changed nothing and the problem is still the same. The results are completely aleatory, and I am saving my app every time before testing. Don't know how to be sure it has not been cached somewhere.

Sexycrets
Posts: 0
Joined: Thu Oct 03, 2013 3:06 am

Load event not firing in pages created from custom template

Back to the beginning, I had changed nothing and the problem is still the same. The results are completely aleatory, and I am saving my app every time before testing. Don't know how to be sure it has not been cached somewhere.

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Load event not firing in pages created from custom template

Hi,

This should be working.. Are there any errors in console (F12)?

Sexycrets
Posts: 0
Joined: Thu Oct 03, 2013 3:06 am

Load event not firing in pages created from custom template

Hi Katya,

Not that I see.

In my page - load - events I have a popup which should fire onload:
http://awesomescreenshot.com/0151sd7eab

the app is here for you to see it does not fire:
http://m.sexycrets.com/

Thank you so much!

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Load event not firing in pages created from custom template

Hello! As you create page based on Template you should add on Load event for template.

Return to “Issues”