In-content Editor image keeping ?action=thumbnail

Hello all,
I've been working on a few BC projects now and found the '?action=thumbnail&width=600&height=300&algorithm=fill_proportional' that you can add onto images really useful in helping keep site design - mainly it means clients do not need to upload images with exact dimensions to keep things consistent.
However, when you add the In-content Editor attribute 'ice:editable="image"' and replace the image via the front end Edit screen the '?action=thumbnail&width=600&height=300&algorithm=fill_proportional' will be removed from the image's path and therefore break design / consistency. Is there anyway to stop this from happening?
Regards,
Mat

Hi Vinay,
I recommend to disable the link for an image using Jquery in Content Editor web part.
First, you need to use F12 tool in Internet Explorer(IE) to get the html tag for the image, and you’d better find the class or id value for the tag of the image.
For example, if the class for the image is test, then the code should be:
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.2.js"></script>
<script type="text/javascript">
$('.test').click(function(e) {
e.preventDefault();
</script>
You can also paste the code of the image here for further research.
Best regards.
Thanks
Victoria Xia
TechNet Community Support

Similar Messages

  • Disable link for a Image in Content editor web part

    Hi
    i want to disable hyperlink for a banner added using content editor web part. Instead of hiding using Target Audience, i want to disable the link.
    Please help me how can i achieve this?
    regards,
    Vinay
    Thanks and Regards, vinnu

    Hi Vinay,
    I recommend to disable the link for an image using Jquery in Content Editor web part.
    First, you need to use F12 tool in Internet Explorer(IE) to get the html tag for the image, and you’d better find the class or id value for the tag of the image.
    For example, if the class for the image is test, then the code should be:
    <script type="text/javascript" src="http://code.jquery.com/jquery-1.8.2.js"></script>
    <script type="text/javascript">
    $('.test').click(function(e) {
    e.preventDefault();
    </script>
    You can also paste the code of the image here for further research.
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • Can't place images in Joomla 1.5 content editor

    Since upgrading to FF3.6.10, when placing an image in content editor in Joomla 1.5 website(s) the image is not placed and only a short section of code is visible in the html view after completing task as below;
    ..(img border="0" /)
    Reverting to earlier version of FF resolves this and everything works normally, testing the same function of other editors is satisfactory and images place correctly.
    Not sure if this error is relative, but was displayed when the problem was noticed.
    Error: Async statement execution returned with '11', 'database disk image is malformed'
    Source File: file:///Applications/Firefox.app/Contents/MacOS/components/nsPlacesDBFlush.js
    Line: 312

    Copy and Paste this code in the Code field in the "Tools > Error Console" and click the "Evaluate" button to cleanup and compress the places.sqlite database file.
    <pre><nowiki>Components.utils.import("resource://gre/modules/PlacesDBUtils.jsm");PlacesDBUtils.checkAndFixDatabase();</nowiki></pre>
    If that gives the same error then see http://kb.mozillazine.org/Locked_or_damaged_places.sqlite

  • Since installing 3.6.9 my Joomla content editor pop-up windows no longer return the URLs selected

    I recently upgraded to Firefox 3.6.9 and found that when using the editor in a Joomla 1.0.15 website , the content editor pop-up windows no longer return URLs selected (eg: image or file URL to be used in a link). I have been using the site with no problems for many years, and the problem was cured when I reinstalled 3.6.8

    Thanks cor-el but the problem is not in my web development but is a new issue/problem in FireFox which was not present in all versions up to and including version 3.6.8 and was only introduced in version 3.6.9. I have also established that the same problem also exists in FireFox version 4 beta 6 and have therefore also raised a second question today.
    My understanding was that I should raise these issues in this forum, but I will also check out the other forum.

  • Add and edit content editor web part to pages in bulk.

    Hello,
    I had recently posted a question 'Build pages in
    bulk' and thanks to
    Alex Brassington, I was able to do just that. Now, I want to take this PS script and XML file to the next level. Currently I am using page content to add simple text to each pages in bulk. Now, I'd like to add the Content Editor webpart and also add text
    in it in bulk. Is that possible? Below is the code for both the PS and the XML. The script is run as
    PS c:\scripts> .\New-Page.ps1 “c:\pages.xml”
    http://SharePoint.contoso.com/sites/TestSite
    New-Page.ps1
    [xml]$pagesXML = Get-Content $args[0]
    $siteUrl = $args[1]
    $web = Get-SPWeb $siteURL
    $pub = [Microsoft.SharePoint.Publishing.PublishingWeb]::GetPublishingWeb($web)
    $pagesXML.Pages.Page | ForEach-Object {
      $fileName = $_.FileName
      $title = $_.Title
      $articleType = $_.ArticleType   #Choice fields just need a string value
      $contact = Get-SPUser -Identity $_.Contact -web $web
      $reviewDate = [DateTime]::Now.AddDays($_.ReviewDate)
      $pagecontent = $_.PageContent
     #Below I replace a token in the XML to get the absolute url
     #else it will error with subwebs, even if using relative with or without /
      $pubPageLayout = $_.PubPageLayout -replace "{siteUrl}", $siteUrl
      Write-Host "Creating page $fileName"
      $newPage = $pub.AddPublishingPage()
      $newPage.ListItem["BaseName"] = $fileName
      $newPage.ListItem["Title"] = $title
      $newPage.ListItem["PublishingPageLayout"] = $pubPageLayout
      $newPage.Update() #Must update here so we can access our custom columns
      $newPage.ListItem["Contact"] = $contact
      $newPage.ListItem["Page Content"] = $pagecontent
      $newPage.Update()
      $newPage.CheckIn("")
      $newPage.ListItem.File.Publish("")
      Write-Host "Published"
    Write-Host "Completed!"
    # Dispose
    $web.Dispose()
    $site.Dispose()
    Pages.xml
    <?xml version="1.0" encoding="utf-8"?>
    <Pages>
     <Page>
     <FileName>Teampaintballcomp1</FileName>
     <Title>Team paintball comp1</Title>
    <PubPageLayout>http://sharepoint.contoso.com/sites/testsite/_catalogs/masterpage/CustomWikiPage.aspx</PubPageLayout>
     <Contact>AD-Ent\TestAccount</Contact>
        <PageContent>
        This is some text.
        This is another line of text.
        </PageContent>
     </Page>
     <Page>
     <FileName>Teampaintballcomp2</FileName>
     <Title>Team paintball comp2</Title>
    <PubPageLayout>http://sharepoint.contoso.com/sites/testsite/_catalogs/masterpage/CustomWikiPage.aspx</PubPageLayout>
     <Contact>AD-Ent\TestAccount</Contact>
        <PageContent>
        This is some text.
        This is another line of text.
        </PageContent>
     </Page>
     <Page>
     <FileName>Teampaintballcomp3</FileName>
     <Title>Team paintball comp3</Title>
    <PubPageLayout>http://sharepoint.contoso.com/sites/testsite/_catalogs/masterpage/CustomWikiPage.aspx</PubPageLayout>
     <Contact>AD-Ent\TestAccount</Contact>
        <PageContent>
        This is some text.
        This is another line of text.
        </PageContent>
     </Page>
     <Page>
     <FileName>Teampaintballcomp4</FileName>
     <Title>Team paintball comp4</Title>
    <PubPageLayout>http://sharepoint.contoso.com/sites/testsite/_catalogs/masterpage/CustomWikiPage.aspx</PubPageLayout>
     <Contact>AD-Ent\TestAccount</Contact>
        <PageContent>
        This is some text.
        This is another line of text.
        </PageContent>
     </Page>
    </Pages>

    If i just fill the .txt file that is linked to the CEWP the web part div scales fine, but adding a nested div or an image and it doesn't scale down.

  • New Content Editor not displaying website with CSS

    I am sure I am doing something wrong, but I just am not sure where to start. I am able to edit my website under the old InContext editor and it displays just fine:
    However, when I try using the new Content Editor, this is what I see:
    What am I doing wrong? I am using dreamweaver to upload my site. I can't figure it out.

    It' a known issue, pages displayed in the new ICE fail to load relative resources.CSS, images, scripts.
    As an workaround: use paths relative to the site root to link to resources, always starting wth a slash /.
    For example:
    <link rel="stylesheet" href="/plugins/smallipop/css/contrib/animate.min.css" type="text/css" media="all" title="Screen" />
    Dan Popa

  • How to Add Content Editor WebPart in PageLayout

    Hi
    I have copied the Content Editor webpart snippet and pasted it in my Page layout.
    But nothing is showing in page edit mode. 
    Can anyone tell me how to add this if the following is not correct?
    <div style="width:100%">
                    <div data-name="WebPartZone">
                        <!--CS: Start Content Editor Snippet--><!--SPM:<%@Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint,
    Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%>--><!--MS:<WebPartPages:ContentEditorWebPart xmlns:WebPartPages="namespace" runat="server" webpart="true">--><!--PS: Start of READ-ONLY
    PREVIEW (do not modify)--><div class="ms-webpart-chrome ms-webpart-chrome-fullWidth "><div class="ms-webpart-chrome-title" id="WebPart_ChromeTitle"><span title="$Resources:core,ContentEditorWebPartTitle;
    - $Resources:core,ContentEditorWebPartDescription;" id="WebPartTitle" class="js-webpart-titleCell"><h2 style="text-align:justify;" class="ms-webpart-titleText"><nobr><span>$Resources:core,ContentEditorWebPartTitle;</span><span
    id="WebPartCaption"></span></nobr></h2></span></div><div WebPartID="00000000-0000-0000-0000-000000000000" HasPers="true" id="WebPart" width="100%" class="ms-WPBody ms-WPBorder
    noindex ms-wpContentDivSpace " OnlyForMePart="true" allowDelete="false" style=""><div class="ms-rtestate-field"></div><div class="ms-clear"></div></div></div><!--PE:
    End of READ-ONLY PREVIEW--><!--MS:<WebPart xmlns="http://schemas.microsoft.com/WebPart/v2">--><!--MS:<Title>--><!--SPM:$Resources:core,ContentEditorWebPartTitle;--><!--ME:</Title>--><!--MS:<Description>--><!--SPM:$Resources:core,ContentEditorWebPartDescription;--><!--ME:</Description>--><!--MS:<PartImageLarge>--><!--SPM:/_layouts/15/images/mscontl.gif--><!--ME:</PartImageLarge>--><!--MS:<ID>--><!--SPM:g_4998626c_cd3f_4f31_962c_51e943923c4f--><!--ME:</ID>--><!--ME:</WebPart>--><!--ME:</WebPartPages:ContentEditorWebPart>--><!--CE:
    End Content Editor Snippet-->
                    </div>
                </div>
    S H A J A N

    Hi  ,
    For adding the Content Editor Web Part to a SharePoint Layout , you can add the  code between the <Zonetemplate> tags:
    <!-- CEWP -->
    <WebPartPages:ContentEditorWebPart ID="ContentEditorWebPart1" runat="server" __MarkupType="xmlmarkup" WebPart="true" __WebPartId="{F40E10C3-ED3A-473D-8538-996344EE795C}" >
    <WebPart xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.microsoft.com/WebPart/v2">
    <Title>Content Editor Web Part</Title>
    <FrameType>TitleBarOnly</FrameType>
    <Description>Use for formatted text, tables, and images.</Description>
    <IsIncluded>true</IsIncluded>
    <PartOrder>2</PartOrder>
    <FrameState>Normal</FrameState>
    <Height />
    <Width />
    <AllowRemove>true</AllowRemove>
    <AllowZoneChange>true</AllowZoneChange>
    <AllowMinimize>true</AllowMinimize>
    <AllowConnect>true</AllowConnect>
    <AllowEdit>true</AllowEdit>
    <AllowHide>true</AllowHide>
    <IsVisible>true</IsVisible>
    <DetailLink />
    <HelpLink />
    <HelpMode>Modeless</HelpMode>
    <Dir>Default</Dir>
    <PartImageSmall />
    <MissingAssembly>Cannot import this Web Part.</MissingAssembly>
    <PartImageLarge>/_layouts/images/mscontl.gif</PartImageLarge>
    <IsIncludedFilter />
    <ExportControlledProperties>true</ExportControlledProperties>
    <ConnectionID>00000000-0000-0000-0000-000000000000</ConnectionID>
    <ID>g_f40e10c3_ed3a_473d_8538_996344ee795c</ID>
    <ContentLink xmlns="http://schemas.microsoft.com/WebPart/v2/ContentEditor" />
    <Content xmlns="http://schemas.microsoft.com/WebPart/v2/ContentEditor"><![CDATA[Edit this text.]]></Content>
    <PartStorage xmlns="http://schemas.microsoft.com/WebPart/v2/ContentEditor" />
    </WebPart>
    </WebPartPages:ContentEditorWebPart>
    For more information, you can refer to the thread:
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/1ba645f2-2481-4560-a4c3-3be9f9e878bc/adding-the-content-editor-web-part-to-a-sharepoint-layout-aspx-page?forum=sharepointcustomizationlegacy
    http://hiren-j-patel.blogspot.com/2012/07/hello-all-today-we-will-add-content.html
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • Upgrade to 2013 leaves "Images" library without Thumbnail Preview working

    The issue I am seeing is occurring after an update from SharePoint 2010 to SharePoint 2013. The library is a publishing library created in 2010. These features are enabled in 2013. Looking at the "Thumbnail Preview" column in any view shows the
    generic sheet of paper icon. Viewing the images in the "Thumbnail" view shows the thumbnails correctly. The images for the list in question are all .gif. As far as I know those are the only ones failing, but we could have missed some other filetypes. 
    I've tried moving a document to a newly created Images library and the preview shows as expected. So I believe I've pretty easily demonstrated that the actual image is not a problem and that SharePoint 2013 can render it. However, it's not a workable solution
    to move these files.
    If I open the library with Fiddler, I get a 404 error for 256_icgif.gif. From there it's been sort of a dead end as I wouldn't know where to test and see if that's part of the issue.
    This is our dev environment before upgrading to 2013 so we're looking for a fix we can perform during or before the upgrade.
    Thanks!

    Hi Christopher,
    Casting my mind back to the Beta, I hit something similar during a test upgrade and if I remember rightly it was to do with the content type mappings that came across. There are two content types Picture and Image which behave differently, so try swapping
    the available content types in the library and changing that.
    Paul
    Please ensure that you mark a question as Answered once you receive a satisfactory response. This helps people in future when searching and helps prevent the same questions being asked multiple times.

  • Exception while opening content editor

    Hi all,
    we are getting following exception while opening content editor
    <Aug 1, 2011 2:56:04 PM IST> <Error> <HTTP> <BEA-101017> <[ServletContext@14211416[app:Oracle Universal Content Management - Content Server module:/ path: spec-version:2.5], request: weblogic.servlet.internal.ServletRequestImpl@94562a[
    GET /cs/resources/wcm/3rdparty/fckeditor/editor/sans-serif;font-size:%20123.1%;color:%20 HTTP/1.1
    User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:5.0.1) Gecko/20100101 Firefox/5.0.1
    Accept: text/css,*/*;q=0.1
    Accept-Language: en-us,en;q=0.5
    Accept-Encoding: gzip, deflate
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Connection: keep-alive
    Referer: http://localhost:16200/cs/resources/wcm/3rdparty/fckeditor/editor/fckeditor.html?InstanceName=SSFCKeditor04365057354602540618&Toolbar=Default
    Cookie: IdcLocale=English-US; fpc10001965722562=vkltub4t|g92AoFmLaa|fses10001965722562=|djlHNRiLaa|vkltub4t|fvis10001965722562=Zj1odHRwJTNBJTJGJTJGbG9jYWxob3N0JTNBMTYyMDAlMkZiYWNreWFyZCUyRmluZGV4Lmh0bSZiPSh1bnRpdGxlZCk=|0|0|0|T|8M8Y88Y8M1|0; IntradocAuth=Internet; oracle.uix=0^^GMT+5:30; JSE
    ]] Root cause of ServletException.
    java.io.CharConversionException: Bad URL
    at intradoc.common.StringUtils.decodeUrlEncodedBytes(StringUtils.java:1277)
    at intradoc.common.StringUtils.decodeUrlEncodedString(StringUtils.java:1217)
    at intradoc.idcwls.IdcServletRequestUtils.decodeUri(IdcServletRequestUtils.java:1805)
    at intradoc.idcwls.IdcServletRequestUtils.fixupLowerCaseUri(IdcServletRequestUtils.java:1822)
    at intradoc.idcwls.IdcServletRequestUtils.processFilterEvent(IdcServletRequestUtils.java:1409)
    Truncated. see log file for complete stacktrace
    >
    please help
    ~Hari

    Found the problem. One of my team mates have added a comment line in one of the facades data control xml. <!-- -->

  • Pop-up images appear as thumbnails

    Today while accessing the help from my hard-drive, I noticed that when I clicked on a link to open a pop-up image it appeared as a thumbnail.
    The pop-up is supposed to appear as a full-sized image, and not a thumbnail.
    When generating the layout, in the multiscreen HTML5 properties, under screen profiles - desktop - optimization, I have Convert absolute image size to relative image size selected.
    When this option is cleared, the pop-up image opens normally.
    However, I would prefer to keep this option selected so that large images are converted to relative image size, and fit on the page.
    What is weird to me, is that when accessing the latest version of the help online through my company's system both pop-up images open normally, and absolute images are converted to relative size so possibly some other setting is causing my pop-up images to become thumbnails?
    Suggestions are welcome,
    Yehoshua

    Interesting. This is a consequence of the optimization setting. What method are you using for the popups? If you’re using autosize popups, try converting one or two to fixed size popups to see whether that helps.
    Greet,
    Willam

  • Converting an image to a Thumbnail

    Is there a way, using the ORDSYS.ORDIMAGE datatype, to copy an image into a thumbnail during a bulk load, and load both the original image AND the thumbnail into the database at the same time?
    Thanks.

    I guess I understand a little better.
    I would use PL/SQL if I were you since it is more flexible, and for images there is not a noticable perfomance between the two.
    I don't know why you would want a trigger. The general PL/SQL procedure used in most of these cases:
    Start
    For every row to be inserted
    Load data and image into row.
    Use processCopy to create thumbnail from original image.
    commit
    end for;
    end;
    You would not need a procedure that first creates the rows and then creates the thumbnails.
    Since there is are restrictions on using new LOB contents in a trigger, I doubt a trigger would work.
    see:
    http://otn.oracle.com/sample_code/products/intermedia/htdocs/avi_bulk_loading.html
    You can take the load example and add code to create the thumbnail at the same tim ethe image is created.
    If the same thumbnail may be used in different tables, you can have it stored in one lob and out the same lob locator in different tables.
    Larry

  • How to center a content editor webpart on a page

    I've a content editor webpart with a linked js that display a searchbox. I'd like center my webpart in the page
    Here is the html in my js file
    <div style="display:table; margin:0 auto;width:100%">
        <div style="float:left">
            <input type="text" id="tbSearch" name="tbSearch" class="ms-sbplain" style="width: 368px;" onkeydown="if (event.keyCode == 13){launchSearch();return false;}">
        </div>
        <div style="float:left;border-width: 1px; border-style: solid; border-color: #c3c3c3; border-left-width:0 ">
            <img  onClick="launchSearch();return false;" title="Search" class="srch-gosearchimg" onmouseover="this.src='\u002f_layouts\u002fimages\u002fgosearchhover30.png'" onmouseout="this.src='\u002f_layouts\u002fimages\u002fgosearch30.png'"
    alt="Search" src="/_layouts/images/gosearch30.png"/>
        </div>                                  
    </div>

    You could wrap the contents of your content editor web part in a div and apply styling/attributes
    to the div to center it on the page.
    as 
    You should be able to get the ID of the Search Web Part and then use the align center code.
    align="center"

  • Html content to image saver

    Hi,
    how to convert html content to image(using image saver) help of BLS Action Block
    Thanks
    Ramesh

    Ramesh,
    I'm not sure your question is very clear. Why are you trying to convert HTML to an image?
    I can assume that your experience with xMII is very limited....?
    Some recommedations are as follows:
    1) Take the xMII training...it's very helpful!
    2) Read the xMII Help guide...it comes packaged with the xMII install and can be accessed from the xMII Portal page on the top right corner of the page.
    3) Reference the xMII Wiki for additional info:  <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/wiki?path=/display/xmii/main&">xmii WIKI...Click Here!</a>
    And as always the best way to see how something works is to TRY it out. Read the help, then post in this community and explain what you have done and tried so that we can help out with what else you can try.
    Questions which ask us to do your work are not very productive for you, or the community as a whole.

  • Relative Path for Jquery into Content Editor Web Part

    Hi;
    I'd add a Content Editor Web Part (CEWP) to a web part zone. I'd edit that CEWP in HTML view and add my script which load Jquery and my question :  how to use a relative
    path for Jquery :
    <SharePoint:ScriptLink Name="SP.js" runat="server" OnDemand="true"
      Localizable="false" />
    <script src="/sites/XXX/Style%20Library/Scripts/jquery.min.js" type="text/javascript"></script>
    <script type="text/javascript">
    My code
    </script>
    Regards

    Hi;
    Firstly, I have used : 
    <script src="/Style%20Library/Scripts/jquery.min.js" type="text/javascript"></script>
    But any result and any change and If I add /Sites/XXX/ : it works correctly ?
    My code is :
    <SharePoint:ScriptLink Name="SP.js" runat="server" OnDemand="true"
        Localizable="false" />
    <script src="/sites/XXX/Style Library/Scripts/jquery.min.js" type="text/javascript"></script>    
    <script type="text/javascript">
    ExecuteOrDelayUntilScriptLoaded(displayTitle, "SP.js");
    var site;
      var context;
      function displayTitle() {
        //Get the current client context
        context = SP.ClientContext.get_current();
        //Add the site to query queue
        site = context.get_web();
        context.load(site);
        //Run the query on the server
        context.executeQueryAsync(onQuerySucceeded, onQueryFailed);
    function onQueryFailed(sender, args) {
      alert('request failed ' + args.get_message() +
        '\n' + args.get_stackTrace());
    function onQuerySucceeded(sender, args) {
        $("#layoutsTable table th span").html("Bienvenue sur le site " + site.get_title() + " - Direction Technique");
        $("#zz17_V4QuickLaunchMenu ul.root li span:contains('Biblioth')").parent().parent().hide();
        $("#zz17_V4QuickLaunchMenu ul.root li span:contains('Listes')").parent().parent().hide();
    </script>

  • Script not working in SharePoint content editor webpart

    Hi All,
    <html>
    <head>
    <script type="text/javascript" src="https://www.google.com/jsapi"></script>
    <script language="javascript" type="text/javascript">
    $(document).ready(function () {
    //Call your function here like
    //retrieveListItems();
    ExecuteOrDelayUntilScriptLoaded(retrieveListItems, "SP.js");
    var siteUrl = '/vceo/PMO/EPMO/';
    var close1 = ''; var close2 = ''; var high = ''; var low = ''; var medium = ''; var lowMedium = ''; var mediumHigh = '';
    var open1 = ''; var open2 = ''; var high1 = ''; var low1 = ''; var medium1 = ''; var lowMedium1 = ''; var mediumHigh1 = '';
    var count = 0; var count1 = 0;
    var initiate = 0; var planning = 0; var execution = 0; var closing = 0;
    var sumMinimal = 0; var sumModerate = 0; var sumCritical = 0; var sumSevere = 0;
    var sumHighlyLikely = 0; var sumLikely = 0; var sumSomewhat = 0; var sumUnlikely = 0;
    var sumBudget = 0; var sumCommitted = 0; var sumConsumption = 0;
    function retrieveListItems() {
    alert("Welcome to Dashboard");
    var clientContext = new SP.ClientContext(siteUrl); alert("site url");
    var oList = clientContext.get_web().get_lists().getByTitle('Project Issues and Risks');
    var oList1 = clientContext.get_web().get_lists().getByTitle('Project');
    var oList2 = clientContext.get_web().get_lists().getByTitle('Risk Impact');
    var oList3 = clientContext.get_web().get_lists().getByTitle('Risk Probability'); alert("get by title");
    var camlQuery = new SP.CamlQuery(); var camlQuery1 = new SP.CamlQuery(); var camlQuery2 = new SP.CamlQuery(); var camlQuery3 = new SP.CamlQuery(); var camlQuery4 = new SP.CamlQuery(); var camlQuery5 = new SP.CamlQuery(); var camlQuery6 = new SP.CamlQuery();
    camlQuery.set_viewXml('<View><Query><Where><Eq><FieldRef Name="Project_x0020_Issue_x0020_Status" /><Value Type="Choice">Issue</Value></Eq></Where></Query></View>');
    camlQuery1.set_viewXml('<View><Query><Where><Eq><FieldRef Name="Project_x0020_Issue_x0020_Status" /><Value Type="Choice">Risk</Value></Eq></Where></Query></View>');
    camlQuery2.set_viewXml('<View><Query><Where><Eq><FieldRef Name="Overall_x0020_Status" /><Value Type="Choice">Open</Value></Eq></Where></Query></View>');
    camlQuery3.set_viewXml('<View><Query><Where><Eq><FieldRef Name="Overall_x0020_Status" /><Value Type="Choice">Closed</Value></Eq></Where></Query></View>');
    camlQuery4.set_viewXml('<View><Query><Where><IsNotNull><FieldRef Name="Project_x0020_Code" /></IsNotNull></Where></Query></View>');
    camlQuery5.set_viewXml('<View><Query><Where><IsNotNull><FieldRef Name="Project_x0020_Code" /></IsNotNull></Where></Query></View>');
    camlQuery6.set_viewXml('<View><Query><Where><IsNotNull><FieldRef Name="Project_x0020_Code" /></IsNotNull></Where></Query></View>');
    this.collListItem = oList.getItems(camlQuery); this.collListItem1 = oList.getItems(camlQuery1); this.collListItem2 = oList1.getItems(camlQuery2); this.collListItem3 = oList1.getItems(camlQuery3);
    this.collListItem4 = oList2.getItems(camlQuery4); this.collListItem5 = oList3.getItems(camlQuery5); this.collListItem6 = oList1.getItems(camlQuery6);
    clientContext.load(collListItem); clientContext.load(collListItem1); clientContext.load(collListItem2); clientContext.load(collListItem3); clientContext.load(collListItem4); clientContext.load(collListItem5); clientContext.load(collListItem6);
    clientContext.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded), Function.createDelegate(this, this.onQueryFailed));
    alert("retrieve list");
    function onQuerySucceeded(sender, args) {
    alert("succeed");
    var listItemEnumerator = collListItem.getEnumerator(); var listItemEnumerator1 = collListItem1.getEnumerator(); var listItemEnumerator2 = collListItem2.getEnumerator();
    var listItemEnumerator3 = collListItem3.getEnumerator(); var listItemEnumerator4 = collListItem4.getEnumerator(); var listItemEnumerator5 = collListItem5.getEnumerator(); var listItemEnumerator6 = collListItem6.getEnumerator();
    var sumClose = 0; var sumClose1 = 0; var sumHigh = 0; var sumMedium = 0; var sumLow = 0; var sumLowMedium = 0; var sumMediumHigh = 0;
    var sumOpen = 0; var sumOpen1 = 0; var sumHigh1 = 0; var sumMedium1 = 0; var sumLow1 = 0; var sumLowMedium1 = 0; var sumMediumHigh1 = 0;
    while (listItemEnumerator.moveNext()) { var oListItem = listItemEnumerator.get_current(); sumClose += oListItem.get_item('Close'); sumOpen += oListItem.get_item('Open'); sumHigh += oListItem.get_item('High'); sumMedium += oListItem.get_item('Medium'); sumLow += oListItem.get_item('Low'); sumLowMedium += oListItem.get_item('LowMedium'); sumMediumHigh += oListItem.get_item('MediumHigh'); }
    while (listItemEnumerator1.moveNext()) { var oListItem1 = listItemEnumerator1.get_current(); sumClose1 += oListItem1.get_item('Close'); sumOpen1 += oListItem1.get_item('Open'); sumHigh1 += oListItem1.get_item('High'); sumMedium1 += oListItem1.get_item('Medium'); sumLow1 += oListItem1.get_item('Low'); sumLowMedium1 += oListItem1.get_item('LowMedium'); sumMediumHigh1 += oListItem1.get_item('MediumHigh'); }
    while (listItemEnumerator4.moveNext()) { var oListItem4 = listItemEnumerator4.get_current(); sumMinimal += oListItem4.get_item('Minimal'); sumModerate += oListItem4.get_item('Moderate'); sumSevere += oListItem4.get_item('Severe'); sumCritical += oListItem4.get_item('Critical'); }
    while (listItemEnumerator5.moveNext()) { var oListItem5 = listItemEnumerator5.get_current(); sumUnlikely += oListItem5.get_item('Unlikely'); sumSomewhat += oListItem5.get_item('Somewhat'); sumLikely += oListItem5.get_item('Likely'); sumHighlyLikely += oListItem5.get_item('HighlyLikely'); }
    while (listItemEnumerator6.moveNext()) { var oListItem6 = listItemEnumerator6.get_current(); sumBudget += oListItem6.get_item('Project_x0020_Budget_x0020_Amoun'); sumCommitted += oListItem6.get_item('Committed_x0020_Budget'); }
    count = this.collListItem2.get_count();
    count1 = this.collListItem3.get_count();
    while (listItemEnumerator2.moveNext()) {
    var oListItem2 = listItemEnumerator2.get_current();
    var stat = oListItem2.get_item('Project_x0020_Status');
    if (stat == "Intiation") {
    initiate = initiate + 1
    if (stat == "Planning") {
    planning = planning + 1
    if (stat == "Execution") {
    execution = execution + 1
    if (stat == "Closing") {
    closing = closing + 1
    //alert("initiate" + initiate); alert("planning" + planning); alert("execution" + execution); alert("closing" + closing);
    //alert("countOpen" + count); alert("closed:" + count1);
    window.close1 = sumClose; window.close2 = sumClose1; window.high = sumHigh; window.low = sumLow; window.medium = sumMedium; window.mediumHigh = sumMediumHigh; window.lowMedium = sumLowMedium;
    window.open1 = sumOpen; window.open2 = sumOpen1; window.high1 = sumHigh1; window.low1 = sumLow1; window.medium1 = sumMedium1; window.mediumHigh1 = sumMediumHigh1; window.lowMedium1 = sumLowMedium1;
    drawChart();
    function onQueryFailed(sender, args) { alert('Request failed.. ' + args.get_message() + '\n' + args.get_stackTrace()); }
    google.load("visualization", "1", { packages: ["corechart"] });
    function drawChart() {
    var data = google.visualization.arrayToDataTable([['Task', 'Issues'], ['Close', window.close1], ['Open', window.open1]]);
    var data1 = google.visualization.arrayToDataTable([['Task', 'Risks'], ['Close', window.close2], ['Open', window.open2]]);
    var data2 = google.visualization.arrayToDataTable([['Program', 'High', 'Medium-High', 'Medium', 'Low-Medium', 'Low'], ['Category', window.high, window.mediumHigh, window.medium, window.lowMedium, window.low]]);
    var data3 = google.visualization.arrayToDataTable([['Program', 'High', 'Medium-High', 'Medium', 'Low-Medium', 'Low'], ['Category', window.high1, window.mediumHigh1, window.medium1, window.lowMedium1, window.low1]]);
    var data4 = google.visualization.arrayToDataTable([['Project', 'Status'], ['Closed', count1], ['Open', count]]);
    var data5 = google.visualization.arrayToDataTable([['Project', 'Status'], ['Initiation', initiate], ['Planning', planning], ['Execution', execution], ['Closing', closing]]);
    var data6 = google.visualization.arrayToDataTable([['Program', 'Impact'], ['Minimal', sumMinimal], ['Moderate', sumModerate], ['Severe', sumSevere], ['Critical', sumCritical]]);
    var data7 = google.visualization.arrayToDataTable([['Program', 'Probability'], ['Highly Likely/Probable(76%-100%)', sumHighlyLikely], ['Likely(51%-76%)', sumLikely], ['Somewhat Likely(26%-50%)', sumSomewhat], ['Unlikely/Improbable(0%-25%)', sumUnlikely]]);
    var data8 = google.visualization.arrayToDataTable([['Project', 'Budget'], ['Approved', sumBudget], ['Committed', sumCommitted]]);
    var options = { title: 'Program Issues', width: 200, height: 300, legend: 'bottom', pieSliceText: 'value', pieStartAngle: 180, };
    var options1 = { title: 'Program Risks', width: 200, height: 300, legend: 'bottom', pieSliceText: 'value', pieStartAngle: 180, };
    var options2 = { width: 200, height: 200, legend: { position: 'top', maxLines: 3 }, bar: { groupWidth: '25%' }, isStacked: true, vAxis: { title: 'Open', titleTextStyle: { color: 'red' } } };
    var options3 = { width: 200, height: 200, legend: { position: 'top', maxLines: 3 }, bar: { groupWidth: '25%' }, isStacked: true, vAxis: { title: 'Open', titleTextStyle: { color: 'red' } } };
    var options4 = { title: 'Project Status', width: 225, height: 300, legend: 'bottom', pieSliceText: 'value', pieStartAngle: 180, };
    var options5 = { width: 175, height: 200, legend: { position: 'top', maxLines: 10 }, pieSliceText: 'value', };
    var options6 = { title: 'Program Risk Impact', width: 300, height: 300, legend: 'right', pieSliceText: 'value', };
    var options7 = { title: 'Program Risk Probable', width: 300, height: 300, legend: 'right', pieSliceText: 'value', };
    var options8 = { title: 'Project Budget', width: 300, height: 300, legend: 'bottom', pieSliceText: 'value', };
    var chart = new google.visualization.PieChart(document.getElementById('chart_div3'));
    chart.draw(data, options);
    var chart1 = new google.visualization.PieChart(document.getElementById('chart_div'));
    chart1.draw(data1, options1);
    var chart2 = new google.visualization.ColumnChart(document.getElementById('chart_div1'));
    chart2.draw(data2, options2);
    var chart3 = new google.visualization.ColumnChart(document.getElementById('chart_div2'));
    chart3.draw(data3, options3);
    var chart4 = new google.visualization.PieChart(document.getElementById('chart_div4'));
    chart4.draw(data4, options4);
    var chart5 = new google.visualization.PieChart(document.getElementById('chart_div5'));
    chart5.draw(data5, options5);
    var chart6 = new google.visualization.PieChart(document.getElementById('chart_div6'));
    chart6.draw(data6, options6);
    var chart7 = new google.visualization.PieChart(document.getElementById('chart_div7'));
    chart7.draw(data7, options7);
    var chart8 = new google.visualization.ColumnChart(document.getElementById('chart_div8'));
    chart8.draw(data8, options8);
    </script>
    </head>
    <body>
    <table >
    <tbody>
    <tr>
    <td id="chart_div8" colspan="2" style="border-bottom:ridge;border-left:ridge;border-top:ridge"></td>
    <td id="chart_div4" style="border-bottom:ridge;border-left:ridge;border-top:ridge"></td>
    <td id="chart_div5" style="border-bottom:ridge;border-right:ridge;border-top:ridge"></td>
    </tr>
    <tr>
    <td id="chart_div" style="border-bottom:ridge;border-left:ridge;"></td>
    <td id="chart_div2" style="border-bottom:ridge;"></td>
    <td id="chart_div3" style="border-bottom:ridge;border-left:ridge;"></td>
    <td id="chart_div1" style="border-bottom:ridge;border-right:ridge""></td>
    </tr>
    <tr>
    <td id="chart_div6" colspan="2" style="border-bottom:ridge;border-left:ridge;"></td>
    <td id="chart_div7" colspan="2" style="border-bottom:ridge;border-left:ridge;border-right:ridge"></td>
    </tr>
    </tbody>
    </table>
    </body>
    </html>
    This content editor webpart not working in sharepoint page. Once I checked out to the page then chart is working. When i checkedin function not get called. How to fix this?
    THanks in advance!

    In SharePoint 2013, sp.js and sp.runtime.js does not load on the page in published mode. You need to explicitly load these files. You can check using IE developer tools in the Script section that in published mode these files are missing.
    In order to fix this issue explictly refer these two js files on your page.
    <script type="text/javascript" src="_layouts/15/sp.runtime.js"></script>
    <script type="text/javascript" src="_layouts/15/sp.js"></script>
    Geetanjali Arora | My blogs |

Maybe you are looking for