cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jeffgreenrc
Helper III
Helper III

sequene of method on page load

Hi Gurus,

 

Can someone tell me what are all the sequence of methods/events executed when page load occurs.

 

I need to write java script then.


Thanks

3 REPLIES 3
OliverRodrigues
Super User
Super User

Hi, all you need is to add your JavaScript within a document.ready:

 

$(document).ready(function(){
 //// your JS here
});



If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Power Pages Super User | MVP


Oliver Rodrigues


 

That i know already but based how sequence of execution take place with respect page hierarchies and browser methods

  1. What is the sequence page loading (template, entity form and web page etc
  2. What is the sequence of  method exectuion on browser i.e window.load and document.ready etc

 

ragavanrajan
Super User
Super User

Hi @jeffgreenrc ,

 

 Usually, this is the order of sequence. I don't think there is documentation yet. But sharing based on what we have experienced so far. 

 

1. If the page has an entity list. 

Order sequence JS execution
1. Web Template / Page Template contains JS
2. Entity list
3. Page 

 

2. If the Page has Entity form (Basic / Advanced Form) 

 

Order sequence JS execution
1. Web Template / Page Template contains JS
2. Entity Form
3. Page 

 

For your second question, I am adding the official reference where it contains sample jQuery execution 

https://docs.microsoft.com/en-us/powerapps/maker/portals/configure/add-custom-javascript 

You can find how the jQuery sequence is utilized. Adding few more 

1. Entity form on load 

2. Entity List on load 

 

The above two methods should be wrapped under $(document).ready. 

 

Hope it helps. 
------------

If you like this post, give it a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users to find it.

Helpful resources

Announcements
Carousel Community Blog

Check out the Community Blog

Read all about the most recent blogs in the community!

Carousel News & Announcements

What's New in the Community?

Check out the latest News & Events in the community!

Users online (3,417)