I've actually just been doing something like this. As soon as you check in the page, all javascript etc in a CEWP is removed. The way I worked around it is to put everything in a text file, save the text file to a document library, and reference that from the CEWP.
My text file is attached (if it makes it to the list) and then when you add the CEWP, the very first option gives you a chance to pull in content from a url - simply insert the url to the text file. From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Web Admin Sent: Tuesday, 27 November 2012 2:27 PM To: ozMOSS Subject: JS Client OM - script only runs in edit mode Hi all, I have added some JavaScript to a CEWP on a list view. It runs beautifully when the page is in edit mode but does nothing when not. I'm assuming that a required js file is not being loaded in view mode but am stumped. I have a script reference to my jQuery lib. This is correct and proven. Am I missing something? A reference to sp.js or something else blindingly obvious? Regards, Paul ________________________________ Stockland Notice: If this communication has been sent to you by mistake, please delete and notify us. If it has been sent to you by mistake, legal privilege is not waived or lost and you are not entitled to use it in any way. Stockland and its subsidiaries reserve the right to monitor e-mail communication through its networks.
ÿþ<