cancel
Showing results for 
Search instead for 
Did you mean: 

Execute js after page load

zlu
Champ in-the-making
Champ in-the-making
Hi all,

I have a question about how to execute the js after a  edit form pop up.

Right now I have a edit form with a select list, and I want to add item to the list by js.

I have tried to add the js in the control template, but it executed before the edit form load, so it can never find the control that I want.

So I want to know if there is any way to execute the js after page load?

Cheers,
Daniel
1 REPLY 1

jpotts
World-Class Innovator
World-Class Innovator
If you are using YUI you should follow the pattern that Alfresco uses. Your client-side component can register a listener that will get called when the page and all of its dependencies have loaded.

You can see an example of an onReady here:
http://code.google.com/p/alfresco-get-latest-document/source/browse/tags/2.0/source/web/extension/co...

But it isn't a very exciting example. You might look around at Share Extras to see if there are some better examples.

Jeff