Tuesday, January 12, 2010

Trigger Javascript Function on SharePoint Page Load

Want to trigger a Javascript function on SharePoint page load? All you have to do is push your function's name to this array and it will trigger in the OnLoad event of the window.

Example: Place this code in CEWP
function MyFunction() {
    alert('it works');

In custom SharePoint pages, this chunk needs to be added just below: PlaceHolderMain or PlaceHolderAdditionalPageHead

You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.

Check out these SharePoint products:

No comments :

Post a Comment

Please Login and comment to get your questions answered!

You might also like:

Related Posts Plugin for WordPress, Blogger...