RE: JS Client OM - script only runs in edit mode

2012-11-26 Thread Callum Bundy
I think if you put your JS in a form web part it will be OK in there for future 
reference.

Callum

From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of 
Nigel Hertz
Sent: Tuesday, 27 November 2012 4:42 PM
To: ozMOSS
Subject: RE: JS Client OM - script only runs in edit mode

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.
___
ozmoss mailing list
ozmoss@ozmoss.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozmoss


RE: JS Client OM - script only runs in edit mode

2012-11-26 Thread Nigel Hertz
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.
ÿþ<script type="text/javascript"> 

var options = { 

url: 
"/circles/ITcircle/Lists/Innovation/NewForm.aspx",
 

        title: "Respond to survey", 

        allowMaximize: true, 

        showClose: true, 

        width: 925, 

        height: 725, 

        dialogReturnValueCallback: 
silentCallback}; 

function open() 
{SP.UI.ModalDialog.showModalDialog(options);}
 

function silentCallback(dialogResult, 
returnValue) { 

} 

function refreshCallback(dialogResult, 
returnValue) { 

    
SP.UI.Notify.addNotification('Operation 
Successful!'); 

    
SP.UI.ModalDialog.RefreshPage(SP.UI.DialogResult.OK);
 

} 

</script>





<table width="100%" 
class="ms-rteTable-SGP" 
cellspacing="0"><tbody><tr 
class="ms-rteTableHeaderRow-SGP"><th 
class="ms-rteTableHeaderEvenCol-SGP">Calling
 all Innovators! </th>

<th 
class="ms-rteTableHeaderOddCol-SGP"> 
</th></tr>

<tr class="ms-rteTableOddRow-SGP"><td 
class="ms-rteTableEvenCol-SGP">Now is 
the time to bring your great idea to 
life!<br/><br/>

Innovation is an important part of our 
business, but time constraints mean our 
ideas sometimes don't get off the 
ground. We want to change 
that.<br/><br/>

In December and January we want you to 
have the opportunity to build and 
showcase your innovation that can 
benefit us in IT, our business 
colleagues or Stockland's 
customers.<br/><br/>

We'll have more information soon, but 
to start we want you to tell us about 
your idea by answering a few simple 
questions.

<p><br/>

<a href="javascript:open()">Click 
here</a> to launch the survey.</p></td>

<td class="ms-rteTableOddCol-SGP"><div 
style="text-align: right"><img 
width="326" height="349" 
alt="Innovation.jpg" 
src="/circles/ITcircle/PublishingImages/Innovation.jpg"
 style="margin: 5px; height: 
289px"/></div></td></tr>

Re: JS Client OM - script only runs in edit mode

2012-11-26 Thread Iain Carlin
Hi Paul,

Don't have a direct answer for you, but if you use IE Developer Tools (F12)
you will see what scripts aren't being loaded.

(I had a similar experience the other day and it was due to an included js
file being checked out - F12 helped me find which one).

Cheers, Iain

On 27 November 2012 13:57, Web Admin  wrote:

> 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
>
> ___
> ozmoss mailing list
> ozmoss@ozmoss.com
> http://prdlxvm0001.codify.net/mailman/listinfo/ozmoss
>
>
___
ozmoss mailing list
ozmoss@ozmoss.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozmoss


JS Client OM - script only runs in edit mode

2012-11-26 Thread Web Admin
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
___
ozmoss mailing list
ozmoss@ozmoss.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozmoss


ShowInViewForms SPField property

2012-11-26 Thread Web Admin
Hi all,

Can anyone tell me what this property is supposed to do?

I've checked it against a user with Read permissions and the field is still
visible in list views and all list forms.

Regards,

Paul
___
ozmoss mailing list
ozmoss@ozmoss.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozmoss