Hi Paul,

 

I've successfully implemented:

 

function _spBodyOnLoad() {yourFunctionCall()}

function yourFunctionCall()

{

       var doSomethingHere = "I'm doing it here";

       alert(doSomethingHere );

}

 

You probably want to test whether or not you're in PostBack, and so only
embed JavaScript when it's appropriate...

Let me know if this is what you were after.

Kind Regards,

Wilson Wampers



From: [email protected] [mailto:[email protected]] On Behalf Of Paul
Noone
Sent: Monday, 22 December 2008 07:24
To: [email protected]
Subject: Getting around _spBodyOnLoadWrapper

 

My earlier excitement at discovering I could add JavaScript directly to
content editor web parts was quashed upon realising that any onload
events I might require were being overridden by the master page's onload
call to _spBodyOnLoadWrapper in the body tag.

 

Has anyone found a clever way to add extra onload events to a page
without modifying the core.js files?

 

Has anyone written a wrapper function that checks for onload events and
allows you to add extra functions as required? Or is there another way?

 

Any advice appreciated.

________________________________

List address: [email protected]

Subscribe: [email protected]

Unsubscribe: [email protected]

List FAQ: http://www.codify.com/lists/ozmoss
<http://www.codify.com/lists/ozmoss> 

Other lists you might want to join: http://www.codify.com/lists
<http://www.codify.com/lists> 

--------------------------------------------------------------------------------
List address: [email protected]
Subscribe: [email protected]
Unsubscribe: [email protected]
List FAQ: http://www.codify.com/lists/ozmoss
Other lists you might want to join: http://www.codify.com/lists

Reply via email to