none
Print Function

    Question

  • Content remove from the Page when I add the javascript to a content editor web part. Share point 2013 

    <script language="JavaScript">
    //Controls which Web Part or zone to print
    var WebPartElementID = "ctl00_ctl48_g_6ec7f7fe_158c_4d53_b22c_fde43e035222_ctl00";
    //Function to print Web Part
    function PrintWebPart()
    {
    var bolWebPartFound = false;
    if (document.getElementById != null)
    {
    //Create html to print in new window
    var PrintingHTML = '<HTML>\n<HEAD>\n';
    //Take data from Head Tag
    if (document.getElementsByTagName != null)
    {
    var HeadData= document.getElementsByTagName("HEAD");
    if (HeadData.length > 0)
    PrintingHTML += HeadData[0].innerHTML;
    }
    PrintingHTML += '\n</HEAD>\n<BODY>\n';
    var WebPartData = document.getElementById(WebPartElementID);
    if (WebPartData != null)
    {
    PrintingHTML += WebPartData.innerHTML;
    bolWebPartFound = true;
    }
    else
    {
    bolWebPartFound = false;
    alert ('Cannot Find Web Part');
    }
    }
    PrintingHTML += '\n</BODY>\n</HTML>';
    //Open new window to print
    if (bolWebPartFound)
    {
    var PrintingWindow = window.open("","PrintWebPart", "toolbar,width=800,height=600,scrollbars,resizable,menubar");
    PrintingWindow.document.open();
    PrintingWindow.document.write(PrintingHTML);
    // Open Print Window
    PrintingWindow.print();
    }
    }
    < /script>
    
    <input type="button" OnClick="javascript:void(PrintWebPart())" value="Print Web Part">
    Wednesday, April 19, 2017 1:08 PM

All replies

  • Hi,

    Try to add your script to Script Editor web part instead of Content Editor web part, or could you provide screenshots for your case so it would help us to understand your case more?

     

    Or you could try with below solution.

    http://spmavericks.com/2014/09/24/sharepoint-20132010-printing-web-part-contents-using-javascript-css/

    Best Regards,

    Lee


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com



    Friday, April 21, 2017 6:11 AM
  • So the problem is the web part is inside of the "Web part Tabs"  if I remove the web part tabs and have it by itself the code works fine.
    Friday, April 21, 2017 3:33 PM
  • Hey Lee,

    The problem I'm running into is that I'm trying to print the web part inside a Web Part Tab.

    Friday, April 21, 2017 3:46 PM
  • Hi,

    Do you custom the page as "Web part Tabs"?

    If so, could you provide details for your solution? Or with below Tabbed Web Part Zone solution.

    https://sharepointtabs.codeplex.com/

     

    Best Regards,

    Lee


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Monday, April 24, 2017 1:27 AM
  • 
    <div class="ms-webpart-chrome-title" id="WebPartWPQ3_ChromeTitle">
    		<span title="RFI" id="WebPartTitleWPQ3" class="js-webpart-titleCell"><h2 style="text-align:justify;" class="ms-webpart-titleText"><a accesskey="W" href="/sites/sitec2/dannitest/Lists/RFI"><nobr><span>RFI</span><span id="WebPartCaptionWPQ3"></span></nobr></a></h2></span>
    	</div><div WebPartID="8ef1e54c-8348-40b1-84bc-32c88d56e232" WebPartID2="f2f7ebd6-abbe-48d5-84b4-25a17a0466e9" HasPers="false" id="WebPartWPQ3" width="100%" class="ms-wpContentDivSpace " allowRemove="false" allowDelete="false" allowExport="false" style="" ><iframe id="ctl00_ctl48_g_f2f7ebd6_abbe_48d5_84b4_25a17a0466e9_ctl00" style="offsetLeft:-550px;offsetTop:-550px;display:block;" width="0px" height="0px" frameBorder="0" tabIndex="-1"></iframe><span></span><table width="100%" cellspacing="0" cellpadding="0" border="0" role="presentation" xmlns:x="http://www.w3.org/2001/XMLSchema" xmlns:d="http://schemas.microsoft.com/sharepoint/dsp" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:SharePoint="Microsoft.SharePoint.WebControls" xmlns:pcm="urn:PageContentManager" xmlns:ddwrt2="urn:frontpage:internal"><tr><td id="scriptWPQ3"></td></tr></table><div id="scriptPagingWPQ3" xmlns:x="http://www.w3.org/2001/XMLSchema" xmlns:d="http://schemas.microsoft.com/sharepoint/dsp" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:SharePoint="Microsoft.SharePoint.WebControls" xmlns:pcm="urn:PageContentManager" xmlns:ddwrt2="urn:frontpage:internal"></div><div class="ms-clear"></div></div>
    </div>
    		</div></div><div id="vid_f2f7ebd6-abbe-48d5-84b4-25a17a0466e9" unselectable="on" style="display&#58;none;"></div></div><p>&#160;</p><div class="ms-rtestate-read ms-rte-wpbox"><div class="ms-rtestate-notify  ms-rtestate-read b8c577b3-c18a-4c5c-8c79-546ee5f924e0" id="div_b8c577b3-c18a-4c5c-8c79-546ee5f924e0" unselectable="on"><div id="MSOZoneCell_WebPartctl00_ctl48_g_b8c577b3_c18a_4c5c_8c79_546ee5f924e0" class="s4-wpcell-plain ms-webpartzone-cell ms-webpart-cell-vertical ms-fullWidth ">
    			<div class="ms-webpart-chrome ms-webpart-chrome-vertical ms-webpart-chrome-fullWidth ">
    	<div WebPartID="a2965ddf-4fbe-46ae-a28d-6c3315acdec2" WebPartID2="b8c577b3-c18a-4c5c-8c79-546ee5f924e0" HasPers="false" id="WebPartctl00_ctl48_g_b8c577b3_c18a_4c5c_8c79_546ee5f924e0" width="100%" class="ms-WPBody noindex " allowRemove="false" allowDelete="false" allowExport="false" style="" ><div id="ctl00_ctl48_g_b8c577b3_c18a_4c5c_8c79_546ee5f924e0">
    		<span style="display:inline-block;font-family:Arial;width:100%;"></span>
    	</div>
    
                <!-- Reference the jQueryUI theme's Custome stylesheet  --> 
                <link  type="text/css" rel="stylesheet" href="/_layouts/15/jQuery/Plugins/jquery-ui-1.11.2.custom/jquery-ui.css" /> 
                <!-- Reference jQuery on the Masterpage not included here --> 
                                        <!-- Reference jQueryUI Custom Root relative for caching --> 
                                        <script type="text/javascript" src="/_layouts/15/jQuery/Plugins/jquery-ui-1.11.2.custom/jquery-ui.min.js"></script> <script type="text/javascript">
                    
                     jQuery(document).ready(function($) {
                          $('.s4-wpcell').hide();
                         $('.s4-wpcell-plain').hide();
    
                         //Put the Web Part Title for all the Web Parts you wish
                         //to put into the tabbed view into the array below.
                        setTimeout(function() {
                            HillbillyTabsCustom_ctl00_ctl48_g_b8c577b3_c18a_4c5c_8c79_546ee5f924e0(['RFI']);
                        ShowActiveTab_ctl00_ctl48_g_b8c577b3_c18a_4c5c_8c79_546ee5f924e0()
                        }, 800);
                        
                    });
                    
        
    
                    function HillbillyTabsCustom_ctl00_ctl48_g_b8c577b3_c18a_4c5c_8c79_546ee5f924e0(webPartTitles)
                    {
                        
                        for(index in webPartTitles)
                        {
                            var title = webPartTitles[index];
                            $('#HillbillyTabs_ctl00_ctl48_g_b8c577b3_c18a_4c5c_8c79_546ee5f924e0').append('<li><a href="#Tab'+index+'_ctl00_ctl48_g_b8c577b3_c18a_4c5c_8c79_546ee5f924e0" id="TabHead'+index+'_ctl00_ctl48_g_b8c577b3_c18a_4c5c_8c79_546ee5f924e0" onclick="SetCookie_ctl00_ctl48_g_b8c577b3_c18a_4c5c_8c79_546ee5f924e0(this.id);">'+title+'</a></li>').after('<div id="Tab'+index+'_ctl00_ctl48_g_b8c577b3_c18a_4c5c_8c79_546ee5f924e0"></div>');
                            $("span:contains('"+title+"')").each(function(){
                                if ($(this).text() == title){
                                   var webPart = $(this).hide().closest('span').closest('[id^="MSOZoneCell_WebPart"]');
                                   if ($(webPart).contents().html() != undefined)
                                   {
                                           webPart = $(webPart).contents();
                                   }
                                   $('#Tab' + index+'_ctl00_ctl48_g_b8c577b3_c18a_4c5c_8c79_546ee5f924e0').append((webPart));
                            }});
                        }
                        $('#tabsContainer_ctl00_ctl48_g_b8c577b3_c18a_4c5c_8c79_546ee5f924e0').tabs();
                        $('.s4-wpcell').show();
                         $('.s4-wpcell-plain').show();
                    
                    }
    
                    function SetCookie_ctl00_ctl48_g_b8c577b3_c18a_4c5c_8c79_546ee5f924e0(id)
                    {
                           var date = new Date();
                           //make the cookie expire in 20 minutes
                           date.setTime(date.getTime()+(1200*1000));
                           var expires = '; expires='+date.toGMTString();
                           document.cookie = 'ActiveTab_ctl00_ctl48_g_b8c577b3_c18a_4c5c_8c79_546ee5f924e0='+id+expires+'; path=/';
                    }
        
                    function ShowActiveTab_ctl00_ctl48_g_b8c577b3_c18a_4c5c_8c79_546ee5f924e0()
                    {
                        
                        var name = 'ActiveTab_ctl00_ctl48_g_b8c577b3_c18a_4c5c_8c79_546ee5f924e0';
                        var cookieArray = document.cookie.split(';');
                        for (index in cookieArray)
                        {
                            var keyValuePair = cookieArray[index].split('=');
                            var key = keyValuePair[0];
                            key  = key.replace(/^\s+|\s+$/g, "");
                            if (key == name)
                            {
                                var value = keyValuePair[1];
                                $('#' + value).click();
                                return;
                            }
                        }
                        
                    }
    
    
                </script>
                <div id="tabsContainer_ctl00_ctl48_g_b8c577b3_c18a_4c5c_8c79_546ee5f924e0"><ul id="HillbillyTabs_ctl00_ctl48_g_b8c577b3_c18a_4c5c_8c79_546ee5f924e0"></ul></div>
                    <div class="ms-clear"></div></div>
    </div>
    

    Monday, April 24, 2017 11:59 AM
  • <script type="text/javascript" src="/jquery-1.4.1.min.js"></script>
    <script type="text/javascript" src="/PrintArea.js"></script>
    
     <SCRIPT type=text/javascript>
            function printPage(idOfWebPart){
                var printElement = document.getElementById(idOfWebPart);
                $(printElement).printArea({mode: "popup", popClose: false});
            };
    </SCRIPT>
    
    <input type=button value="Print Page" onclick="javascript:printPage('ctl00_ctl48_g_b8c577b3_c18a_4c5c_8c79_546ee5f924e0');">a

    I place this in a script editor and it removes everything from the page.

     

    Monday, April 24, 2017 12:14 PM
  • Hi,

    Could you provide full code of the page and the scenario how you create the page(web part page/publishing page etc.) as I can’t test your code(the flag is not matching completely).

     

    Best Regards,

    Lee


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Tuesday, April 25, 2017 1:51 AM
  • This is a site pages that I've created. I added a web part task to the page and also added a "web part tabs " and configured it to my task list.

    Added a script editor with the print function and placed the Webpart ID in correct location in the print script which then removes the content from the page.

    	<div id="DeltaPlaceHolderMain">
    	
    		<a id="mainContent" name="mainContent" tabindex="-1"></a>
    		
    	<span id="ctl00_PlaceHolderMain_wikiPageNameDisplay" style="display: none;">
    		print2
    	</span>
    	<span id="ctl00_PlaceHolderMain_wikiPageNameEdit" style="display:none;">
    		<input name="ctl00$PlaceHolderMain$wikiPageNameEditTextBox" type="text" value="print2" maxlength="123" id="ctl00_PlaceHolderMain_wikiPageNameEditTextBox" />
    	</span>
    	<div style='display:none'><input type="submit" name="ctl00$PlaceHolderMain$btnWikiEdit" value="edit" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;ctl00$PlaceHolderMain$btnWikiEdit&quot;, &quot;&quot;, true, &quot;&quot;, &quot;&quot;, false, false))" id="ctl00_PlaceHolderMain_btnWikiEdit" /></div><div style='display:none'><input type="submit" name="ctl00$PlaceHolderMain$btnWikiSave" value="edit" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;ctl00$PlaceHolderMain$btnWikiSave&quot;, &quot;&quot;, true, &quot;&quot;, &quot;&quot;, false, false))" id="ctl00_PlaceHolderMain_btnWikiSave" /></div><div style='display:none'><input type="submit" name="ctl00$PlaceHolderMain$btnWikiRevert" value="Revert" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;ctl00$PlaceHolderMain$btnWikiRevert&quot;, &quot;&quot;, true, &quot;&quot;, &quot;&quot;, false, false))" id="ctl00_PlaceHolderMain_btnWikiRevert" /></div>
    	<div id="ctl00_PlaceHolderMain_WikiField">
    		<div class="ms-wikicontent ms-rtestate-field" style="padding-right: 10px"><div class="ExternalClassEA94260D241F41C4BE7ECC54D5182722"><table id="layoutsTable" style="width&#58;100%;"><tbody><tr style="vertical-align&#58;top;"><td colspan="2"><div class="ms-rte-layoutszone-outer" style="width&#58;100%;"><div class="ms-rte-layoutszone-inner" aria-label="Rich text editor"><p><span class="ms-rteFontSize-7 ms-rteThemeForeColor-9-4">This is my print test page. </span></p></div></div></td></tr><tr style="vertical-align&#58;top;"><td style="width&#58;49.95%;"><div class="ms-rte-layoutszone-outer" style="width&#58;100%;"><div class="ms-rte-layoutszone-inner" aria-label="Rich text editor"><div class="ms-rtestate-read ms-rte-wpbox"><div class="ms-rtestate-notify  ms-rtestate-read 53cfd023-2a93-42a6-a1d3-eb3224daa25d" id="div_53cfd023-2a93-42a6-a1d3-eb3224daa25d" unselectable="on"><div id="MSOZoneCell_WebPartWPQ2" WebPartWPQ2_RelatedListId="{167656c9-53ba-4eea-9526-2c6b148673b8}" WebPartWPQ2_WebPartStorageKey="f3d2c5b0-ed36-42a7-98a9-21e616450549" class="s4-wpcell ms-webpartzone-cell ms-webpart-cell-vertical ms-fullWidth " onkeyup="WpKeyUp(event)" onmouseup="WpClick(event)">
    			<div class="ms-webpart-chrome ms-webpart-chrome-vertical ms-webpart-chrome-fullWidth ">
    	<div class="ms-webpart-chrome-title" id="WebPartWPQ2_ChromeTitle">
    		<span title="Documents" id="WebPartTitleWPQ2" class="js-webpart-titleCell"><h2 style="text-align:justify;" class="ms-webpart-titleText"><a accesskey="W" href="/sites/sitec2/dannitest/Shared%20Documents"><nobr><span>Documents</span><span id="WebPartCaptionWPQ2"></span></nobr></a></h2></span>
    	</div><div WebPartID="f3d2c5b0-ed36-42a7-98a9-21e616450549" WebPartID2="53cfd023-2a93-42a6-a1d3-eb3224daa25d" HasPers="false" id="WebPartWPQ2" width="100%" class="ms-wpContentDivSpace " allowRemove="false" allowDelete="false" allowExport="false" style="" ><iframe id="ctl00_ctl48_g_53cfd023_2a93_42a6_a1d3_eb3224daa25d_ctl00" style="offsetLeft:-550px;offsetTop:-550px;display:block;" width="0px" height="0px" frameBorder="0" tabIndex="-1"></iframe><span></span><table width="100%" cellspacing="0" cellpadding="0" border="0" role="presentation" xmlns:x="http://www.w3.org/2001/XMLSchema" xmlns:d="http://schemas.microsoft.com/sharepoint/dsp" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:SharePoint="Microsoft.SharePoint.WebControls" xmlns:pcm="urn:PageContentManager" xmlns:ddwrt2="urn:frontpage:internal"><tr><td id="scriptWPQ2"></td></tr></table><div id="scriptPagingWPQ2" xmlns:x="http://www.w3.org/2001/XMLSchema" xmlns:d="http://schemas.microsoft.com/sharepoint/dsp" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:SharePoint="Microsoft.SharePoint.WebControls" xmlns:pcm="urn:PageContentManager" xmlns:ddwrt2="urn:frontpage:internal"></div><div class="ms-clear"></div></div>
    </div>
    		</div></div><div id="vid_53cfd023-2a93-42a6-a1d3-eb3224daa25d" unselectable="on" style="display&#58;none;"></div></div></div></div></td><td class="ms-wiki-columnSpacing" style="width&#58;49.95%;"><div class="ms-rte-layoutszone-outer" style="width&#58;100%;"><div class="ms-rte-layoutszone-inner" aria-label="Rich text editor"><div class="ms-rtestate-read ms-rte-wpbox"><div class="ms-rtestate-notify  ms-rtestate-read f2f7ebd6-abbe-48d5-84b4-25a17a0466e9" id="div_f2f7ebd6-abbe-48d5-84b4-25a17a0466e9" unselectable="on"><div id="MSOZoneCell_WebPartWPQ3" WebPartWPQ3_RelatedListId="{7f1556fb-f657-4888-9ba5-fd73c07eeef3}" WebPartWPQ3_WebPartStorageKey="8ef1e54c-8348-40b1-84bc-32c88d56e232" class="s4-wpcell ms-webpartzone-cell ms-webpart-cell-vertical ms-fullWidth " onkeyup="WpKeyUp(event)" onmouseup="WpClick(event)">
    			<div class="ms-webpart-chrome ms-webpart-chrome-vertical ms-webpart-chrome-fullWidth ">
    	<div class="ms-webpart-chrome-title" id="WebPartWPQ3_ChromeTitle">
    		<span title="RFI" id="WebPartTitleWPQ3" class="js-webpart-titleCell"><h2 style="text-align:justify;" class="ms-webpart-titleText"><a accesskey="W" href="/sites/sitec2/dannitest/Lists/RFI"><nobr><span>RFI</span><span id="WebPartCaptionWPQ3"></span></nobr></a></h2></span>
    	</div><div WebPartID="8ef1e54c-8348-40b1-84bc-32c88d56e232" WebPartID2="f2f7ebd6-abbe-48d5-84b4-25a17a0466e9" HasPers="false" id="WebPartWPQ3" width="100%" class="ms-wpContentDivSpace " allowRemove="false" allowDelete="false" allowExport="false" style="" ><iframe id="ctl00_ctl48_g_f2f7ebd6_abbe_48d5_84b4_25a17a0466e9_ctl00" style="offsetLeft:-550px;offsetTop:-550px;display:block;" width="0px" height="0px" frameBorder="0" tabIndex="-1"></iframe><span></span><table width="100%" cellspacing="0" cellpadding="0" border="0" role="presentation" xmlns:x="http://www.w3.org/2001/XMLSchema" xmlns:d="http://schemas.microsoft.com/sharepoint/dsp" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:SharePoint="Microsoft.SharePoint.WebControls" xmlns:pcm="urn:PageContentManager" xmlns:ddwrt2="urn:frontpage:internal"><tr><td id="scriptWPQ3"></td></tr></table><div id="scriptPagingWPQ3" xmlns:x="http://www.w3.org/2001/XMLSchema" xmlns:d="http://schemas.microsoft.com/sharepoint/dsp" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:SharePoint="Microsoft.SharePoint.WebControls" xmlns:pcm="urn:PageContentManager" xmlns:ddwrt2="urn:frontpage:internal"></div><div class="ms-clear"></div></div>
    </div>
    		</div></div><div id="vid_f2f7ebd6-abbe-48d5-84b4-25a17a0466e9" unselectable="on" style="display&#58;none;"></div></div><p>&#160;</p><div class="ms-rtestate-read ms-rte-wpbox"><div class="ms-rtestate-notify  ms-rtestate-read b8c577b3-c18a-4c5c-8c79-546ee5f924e0" id="div_b8c577b3-c18a-4c5c-8c79-546ee5f924e0" unselectable="on"><div id="MSOZoneCell_WebPartctl00_ctl48_g_b8c577b3_c18a_4c5c_8c79_546ee5f924e0" class="s4-wpcell-plain ms-webpartzone-cell ms-webpart-cell-vertical ms-fullWidth ">
    			<div class="ms-webpart-chrome ms-webpart-chrome-vertical ms-webpart-chrome-fullWidth ">
    	<div WebPartID="a2965ddf-4fbe-46ae-a28d-6c3315acdec2" WebPartID2="b8c577b3-c18a-4c5c-8c79-546ee5f924e0" HasPers="false" id="WebPartctl00_ctl48_g_b8c577b3_c18a_4c5c_8c79_546ee5f924e0" width="100%" class="ms-WPBody noindex " allowRemove="false" allowDelete="false" allowExport="false" style="" ><div id="ctl00_ctl48_g_b8c577b3_c18a_4c5c_8c79_546ee5f924e0">
    		<span style="display:inline-block;font-family:Arial;width:100%;"></span>
    	</div>
    
                <!-- Reference the jQueryUI theme's Custome stylesheet  --> 
                <link  type="text/css" rel="stylesheet" href="/_layouts/15/jQuery/Plugins/jquery-ui-1.11.2.custom/jquery-ui.css" /> 
                <!-- Reference jQuery on the Masterpage not included here --> 
                                        <!-- Reference jQueryUI Custom Root relative for caching --> 
                                        <script type="text/javascript" src="/_layouts/15/jQuery/Plugins/jquery-ui-1.11.2.custom/jquery-ui.min.js"></script> <script type="text/javascript">
                    
                     jQuery(document).ready(function($) {
                          $('.s4-wpcell').hide();
                         $('.s4-wpcell-plain').hide();
    
                         //Put the Web Part Title for all the Web Parts you wish
                         //to put into the tabbed view into the array below.
                        setTimeout(function() {
                            HillbillyTabsCustom_ctl00_ctl48_g_b8c577b3_c18a_4c5c_8c79_546ee5f924e0(['RFI']);
                        ShowActiveTab_ctl00_ctl48_g_b8c577b3_c18a_4c5c_8c79_546ee5f924e0()
                        }, 800);
                        
                    });
                    
        
    
                    function HillbillyTabsCustom_ctl00_ctl48_g_b8c577b3_c18a_4c5c_8c79_546ee5f924e0(webPartTitles)
                    {
                        
                        for(index in webPartTitles)
                        {
                            var title = webPartTitles[index];
                            $('#HillbillyTabs_ctl00_ctl48_g_b8c577b3_c18a_4c5c_8c79_546ee5f924e0').append('<li><a href="#Tab'+index+'_ctl00_ctl48_g_b8c577b3_c18a_4c5c_8c79_546ee5f924e0" id="TabHead'+index+'_ctl00_ctl48_g_b8c577b3_c18a_4c5c_8c79_546ee5f924e0" onclick="SetCookie_ctl00_ctl48_g_b8c577b3_c18a_4c5c_8c79_546ee5f924e0(this.id);">'+title+'</a></li>').after('<div id="Tab'+index+'_ctl00_ctl48_g_b8c577b3_c18a_4c5c_8c79_546ee5f924e0"></div>');
                            $("span:contains('"+title+"')").each(function(){
                                if ($(this).text() == title){
                                   var webPart = $(this).hide().closest('span').closest('[id^="MSOZoneCell_WebPart"]');
                                   if ($(webPart).contents().html() != undefined)
                                   {
                                           webPart = $(webPart).contents();
                                   }
                                   $('#Tab' + index+'_ctl00_ctl48_g_b8c577b3_c18a_4c5c_8c79_546ee5f924e0').append((webPart));
                            }});
                        }
                        $('#tabsContainer_ctl00_ctl48_g_b8c577b3_c18a_4c5c_8c79_546ee5f924e0').tabs();
                        $('.s4-wpcell').show();
                         $('.s4-wpcell-plain').show();
                    
                    }
    
                    function SetCookie_ctl00_ctl48_g_b8c577b3_c18a_4c5c_8c79_546ee5f924e0(id)
                    {
                           var date = new Date();
                           //make the cookie expire in 20 minutes
                           date.setTime(date.getTime()+(1200*1000));
                           var expires = '; expires='+date.toGMTString();
                           document.cookie = 'ActiveTab_ctl00_ctl48_g_b8c577b3_c18a_4c5c_8c79_546ee5f924e0='+id+expires+'; path=/';
                    }
        
                    function ShowActiveTab_ctl00_ctl48_g_b8c577b3_c18a_4c5c_8c79_546ee5f924e0()
                    {
                        
                        var name = 'ActiveTab_ctl00_ctl48_g_b8c577b3_c18a_4c5c_8c79_546ee5f924e0';
                        var cookieArray = document.cookie.split(';');
                        for (index in cookieArray)
                        {
                            var keyValuePair = cookieArray[index].split('=');
                            var key = keyValuePair[0];
                            key  = key.replace(/^\s+|\s+$/g, "");
                            if (key == name)
                            {
                                var value = keyValuePair[1];
                                $('#' + value).click();
                                return;
                            }
                        }
                        
                    }
    
    
                </script>
                <div id="tabsContainer_ctl00_ctl48_g_b8c577b3_c18a_4c5c_8c79_546ee5f924e0"><ul id="HillbillyTabs_ctl00_ctl48_g_b8c577b3_c18a_4c5c_8c79_546ee5f924e0"></ul></div>
                    <div class="ms-clear"></div></div>
    </div>
    		</div></div><div id="vid_b8c577b3-c18a-4c5c-8c79-546ee5f924e0" unselectable="on" style="display&#58;none;"></div></div></div></div></td></tr><tr style="vertical-align&#58;top;"><td colspan="2"><div class="ms-rte-layoutszone-outer" style="width&#58;100%;"><div class="ms-rte-layoutszone-inner" aria-label="Rich text editor">
    
    
     
    
    <div class="ms-rtestate-read ms-rte-wpbox"><div class="ms-rtestate-notify  ms-rtestate-read fb195897-158e-4729-8d38-1151449c4b4e" id="div_fb195897-158e-4729-8d38-1151449c4b4e" unselectable="on"></div><div id="vid_fb195897-158e-4729-8d38-1151449c4b4e" unselectable="on" style="display&#58;none;"></div></div><div class="ms-rtestate-read ms-rte-wpbox"><div class="ms-rtestate-notify  ms-rtestate-read 13001277-7bb9-421f-ab1a-87e09175cc90" id="div_13001277-7bb9-421f-ab1a-87e09175cc90" unselectable="on"></div><div id="vid_13001277-7bb9-421f-ab1a-87e09175cc90" unselectable="on" style="display&#58;none;"></div></div><p>&#160;</p><div class="ms-rtestate-read ms-rte-wpbox"><div class="ms-rtestate-notify  ms-rtestate-read abc83d84-55f3-40a0-8075-698d6d29a9ea" id="div_abc83d84-55f3-40a0-8075-698d6d29a9ea" unselectable="on"></div><div id="vid_abc83d84-55f3-40a0-8075-698d6d29a9ea" unselectable="on" style="display&#58;none;"></div></div><p>&#160;</p><div class="ms-rtestate-read ms-rte-wpbox" unselectable="on"><div class="ms-rtestate-notify  ms-rtestate-read ed6d9131-69f9-40d5-9640-8b5eea01d8b6" id="div_ed6d9131-69f9-40d5-9640-8b5eea01d8b6" unselectable="on"><div id="MSOZoneCell_WebPartctl00_ctl48_g_ed6d9131_69f9_40d5_9640_8b5eea01d8b6" class="s4-wpcell-plain ms-webpartzone-cell ms-webpart-cell-vertical ms-fullWidth ">
    			<div class="ms-webpart-chrome ms-webpart-chrome-vertical ms-webpart-chrome-fullWidth ">
    	<div WebPartID="1d07ce61-fd9b-444f-a914-0f4d6d708828" WebPartID2="ed6d9131-69f9-40d5-9640-8b5eea01d8b6" HasPers="false" id="WebPartctl00_ctl48_g_ed6d9131_69f9_40d5_9640_8b5eea01d8b6" width="100%" class="ms-WPBody noindex " allowRemove="false" allowDelete="false" allowExport="false" style="" ><div id="ctl00_ctl48_g_ed6d9131_69f9_40d5_9640_8b5eea01d8b6">
    		<DIV class="ms-rte-embedcode ms-rte-embedwp"><script type="text/javascript" src="/jquery-1.4.1.min.js"></script>
    <script type="text/javascript" src="/PrintArea.js"></script>
    
     <SCRIPT type=text/javascript>
            function printPage(idOfWebPart){
                var printElement = document.getElementById(idOfWebPart);
                $(printElement).printArea({mode: "popup", popClose: false});
            };
    </SCRIPT>
    
    <input type=button value="Print Page" onclick="javascript:printPage('ctl00_ctl48_g_b8c577b3_c18a_4c5c_8c79_546ee5f924e0');">
    </DIV>
    	</div><div class="ms-clear"></div></div>
    </div>
    		</div></div><div id="vid_ed6d9131-69f9-40d5-9640-8b5eea01d8b6" unselectable="on" style="display&#58;none;"></div></div></div></div></td></tr></tbody></table><span id="layoutsData" style="display&#58;none;">true,true,2</span></div></div>
    	</div>
    	<menu id="MSOMenu_WebPartMenu" class="ms-hide">
    		<ie:menuitem title="Collapse this web part." id="MSOMenu_Minimize" onmenuclick="javascript:MSOLayout_MinimizeRestore(MenuWebPart)" text="Minimize" type="option">
    
    		</ie:menuitem><ie:menuitem title="Expand this web part." id="MSOMenu_Restore" onmenuclick="javascript:MSOLayout_MinimizeRestore(MenuWebPart)" text="Restore" type="option">
    
    		</ie:menuitem><ie:menuitem title="Close this Web Part. You can still find it under closed Web Parts section in the insert ribbon. These changes will apply to all users." id="MSOMenu_Close" onmenuclick="javascript:MSOLayout_RemoveWebPart(MenuWebPart)" text="Close" type="option">
    
    		</ie:menuitem><ie:menuitem title="Delete this Web Part from the page. These changes will apply to all users." id="MSOMenu_Delete" iconsrc="/_layouts/15/images/DelItem.gif" onmenuclick="if(confirm('You are about to permanently delete this Web Part. Are you sure you want to do this?')) {MSOWebPartPage_partDeleted = MenuWebPartID;MSOWebPartPage_MenuDoPostBack('ctl00$ctl48', MenuWebPartID + ';MSOMenu_Delete');}" text="Delete" type="option">
    
    		</ie:menuitem><ie:menuitem type="separator"></ie:menuitem><ie:menuitem title="Change properties of this shared Web Part. These changes will apply to all users." id="MSOMenu_Edit" iconsrc="/_layouts/15/images/EditItem.gif" onmenuclick="javascript:MSOTlPn_ShowToolPane2Wrapper('Edit', 16, MenuWebPartID)" text="Edit Web Part" type="option">
    
    		</ie:menuitem><ie:menuitem title="Show connections options for this Web Part. These changes will apply to all users." id="MSOMenu_Connections" onmenuclick="" text="Connections" type="option">
    
    		</ie:menuitem><ie:menuitem type="separator"></ie:menuitem><ie:menuitem title="Export this Web Part. These changes will apply to all users." id="MSOMenu_Export" onmenuclick="javascript:MSOWebPartPage_ExportCheckWarning(&#39;\u002fsites\u002fsitec2\u002fdannitest\u002f_vti_bin\u002fexportwp.aspx?pageurl=https\u00253A\u00252F\u00252Fsof\u00252Ehq\u00252Esocom\u00252Emil\u00252Fsites\u00252Fsitec2\u00252Fdannitest\u00252FSitePages\u00252Fprint2\u00252Easpx\u0026guidstring=&#39;+ escape(MenuWebPartID), MenuWebPart.getAttribute(&#39;HasPers&#39;) == &#39;true&#39;)" text="Export..." type="option">
    
    		</ie:menuitem><ie:menuitem id="MSOMenu_Help" iconsrc="/_layouts/15/images/HelpIcon.gif" onmenuclick="MSOWebPartPage_SetNewWindowLocation(MenuWebPart.getAttribute('helpLink'), MenuWebPart.getAttribute('helpMode'))" text="Help" type="option" style="display:none">
    
    		</ie:menuitem>
    	</menu>
    <div style='display:none' id='hidZone'><div class="ms-webpart-zone ms-fullWidth">
    		<div id="MSOZoneCell_WebPartctl00_ctl48_g_ed6d9131_69f9_40d5_9640_8b5eea01d8b6" class="s4-wpcell-plain ms-webpartzone-cell ms-webpart-cell-vertical ms-fullWidth ">
    			<div class="ms-PartSpacingVertical"></div>
    		</div><div id="MSOZoneCell_WebPartctl00_ctl48_g_b8c577b3_c18a_4c5c_8c79_546ee5f924e0" class="s4-wpcell-plain ms-webpartzone-cell ms-webpart-cell-vertical ms-fullWidth ">
    			<div class="ms-PartSpacingVertical"></div>
    		</div><div id="MSOZoneCell_WebPartWPQ3" WebPartWPQ3_RelatedListId="{7f1556fb-f657-4888-9ba5-fd73c07eeef3}" WebPartWPQ3_WebPartStorageKey="8ef1e54c-8348-40b1-84bc-32c88d56e232" class="s4-wpcell ms-webpartzone-cell ms-webpart-cell-vertical ms-fullWidth " onkeyup="WpKeyUp(event)" onmouseup="WpClick(event)">
    			<div class="ms-PartSpacingVertical"></div>
    		</div><div id="MSOZoneCell_WebPartWPQ2" WebPartWPQ2_RelatedListId="{167656c9-53ba-4eea-9526-2c6b148673b8}" WebPartWPQ2_WebPartStorageKey="f3d2c5b0-ed36-42a7-98a9-21e616450549" class="s4-wpcell ms-webpartzone-cell ms-webpart-cell-vertical ms-fullWidth " onkeyup="WpKeyUp(event)" onmouseup="WpClick(event)">
    
    		</div>
    	</div></div>
    	
    </div>
        
     
    </div>
    <div id="DeltaFormDigest">
    	
    	
    		
    	
    
    </div>

    Tuesday, April 25, 2017 11:19 AM
  • Hi,

    Seems you created one wiki page, could you provide the full aspx page code so it would help us to debug.

    You could open your page by SharePoint designer and the copy the code.

    Best Regards,

    Lee


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Wednesday, April 26, 2017 1:55 AM
  • 
    <%@ Register TagPrefix="WpNs0" Namespace="SOF.SP13.CommonWebParts.WebParts.WebPartTabs" Assembly="SOF.SP13.CommonWebParts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=60dbce64d76aef5c"%>
    <%@ Assembly Name="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%> <%@ Page Language="C#" Inherits="Microsoft.SharePoint.WebPartPages.WikiEditPage" MasterPageFile="~masterurl/default.master"      MainContentID="PlaceHolderMain" meta:webpartpageexpansion="full" meta:progid="SharePoint.WebPartPage.Document" %>
    <%@ Import Namespace="Microsoft.SharePoint.WebPartPages" %> <%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Import Namespace="Microsoft.SharePoint" %> <%@ Assembly Name="Microsoft.Web.CommandUI, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
    <%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
    <asp:Content ContentPlaceHolderId="PlaceHolderPageTitle" runat="server">
    	<SharePoint:ProjectProperty Property="Title" runat="server"/> - <SharePoint:ListItemProperty runat="server"/>
    </asp:Content>
    <asp:Content ContentPlaceHolderId="PlaceHolderPageImage" runat="server"><SharePoint:AlphaImage ID=onetidtpweb1 Src="/_layouts/15/images/wiki.png?rev=23" Width=145 Height=54 Alt="" Runat="server"/></asp:Content>
    <asp:Content ContentPlaceHolderId="PlaceHolderAdditionalPageHead" runat="server">
    	<meta name="CollaborationServer" content="SharePoint Team Web Site" />
    	<SharePoint:ScriptBlock runat="server">
    	var navBarHelpOverrideKey = "WSSEndUser";
    	</SharePoint:ScriptBlock>
    	<SharePoint:RssLink runat="server"/>
    	</asp:Content>
    <asp:Content ContentPlaceHolderId="PlaceHolderMiniConsole" runat="server">
    	<SharePoint:FormComponent TemplateName="WikiMiniConsole" ControlMode="Display" runat="server" id="WikiMiniConsole"/>
    </asp:Content>
    <asp:Content ContentPlaceHolderId="PlaceHolderLeftActions" runat="server">
    	<SharePoint:RecentChangesMenu runat="server" id="RecentChanges"/>
    </asp:Content>
    <asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server">
    	<span id="wikiPageNameDisplay" style="display: none;" runat="server">
    		<SharePoint:ListItemProperty runat="server"/>
    	</span>
    	<span style="display:none;" id="wikiPageNameEdit" runat="server">
    		<asp:TextBox id="wikiPageNameEditTextBox" runat="server"/>
    	</span>
    	<SharePoint:VersionedPlaceHolder UIVersion="4" runat="server">
    		<SharePoint:SPRibbonButton
    			id="btnWikiEdit"
    			RibbonCommand="Ribbon.WikiPageTab.EditAndCheckout.SaveEdit.Menu.SaveEdit.Edit"
    			runat="server"
    			Text="edit"/>
    		<SharePoint:SPRibbonButton
    			id="btnWikiSave"
    			RibbonCommand="Ribbon.WikiPageTab.EditAndCheckout.SaveEdit.Menu.SaveEdit.SaveAndStop"
    			runat="server"
    			Text="edit"/>
    		<SharePoint:SPRibbonButton
    			id="btnWikiRevert"
    			RibbonCommand="Ribbon.WikiPageTab.EditAndCheckout.SaveEdit.Menu.SaveEdit.Revert"
    			runat="server"
    			Text="Revert"/>
    	</SharePoint:VersionedPlaceHolder>
    	<SharePoint:EmbeddedFormField id="WikiField" FieldName="WikiField" ControlMode="Display" runat="server"><div class="ExternalClassDB4FDB46E98042EA9294567AF9EA743D"><table id="layoutsTable" style="width&#58;100%;"><tbody><tr style="vertical-align&#58;top;"><td colspan="2"><div class="ms-rte-layoutszone-outer" style="width&#58;100%;"><div class="ms-rte-layoutszone-inner" aria-label="Rich text editor"><p>&#160;</p><p>&#160;</p></div></div></td></tr><tr style="vertical-align&#58;top;"><td style="width&#58;49.95%;"><div class="ms-rte-layoutszone-outer" style="width&#58;100%;"><div class="ms-rte-layoutszone-inner" aria-label="Rich text editor"><p>&#160;</p>
    		<WebPartPages:XsltListViewWebPart runat="server" ViewFlag="" ViewSelectorFetchAsync="False" InplaceSearchEnabled="False" ServerRender="False" ClientRender="True" InitialAsyncDataFetch="False" WebId="00000000-0000-0000-0000-000000000000" IsClientRender="False" GhostedXslLink="main.xsl" NoDefaultStyle="" ViewGuid="{14919DF3-0E91-402D-80AE-FAF39E3E54E9}" EnableOriginalValue="False" ViewContentTypeId="" ListUrl="" ListDisplayName="" ListName="{167656C9-53BA-4EEA-9526-2C6B148673B8}" ListId="167656c9-53ba-4eea-9526-2c6b148673b8" PageSize="-1" UseSQLDataSourcePaging="True" DataSourceID="" ShowWithSampleData="False" AsyncRefresh="False" ManualRefresh="False" AutoRefresh="False" AutoRefreshInterval="60" Title="Documents" FrameType="Default" SuppressWebPartChrome="False" Description="" IsIncluded="True" ZoneID="wpz" PartOrder="2" FrameState="Normal" AllowRemove="True" AllowZoneChange="True" AllowMinimize="True" AllowConnect="True" AllowEdit="True" AllowHide="True" IsVisible="True" CatalogIconImageUrl="/_layouts/15/images/itdl.png?rev=23" TitleUrl="/sites/sitec2/dannitest/Shared Documents" DetailLink="/sites/sitec2/dannitest/Shared Documents" HelpLink="" HelpMode="Modeless" Dir="Default" PartImageSmall="" MissingAssembly="Cannot import this Web Part." PartImageLarge="/_layouts/15/images/itdl.png?rev=23" IsIncludedFilter="" ExportControlledProperties="False" ConnectionID="00000000-0000-0000-0000-000000000000" ID="g_2e4bb3f1_6ee8_44a8_9bb3_3d2736dc36ef" __MarkupType="vsattributemarkup" __WebPartId="{14919DF3-0E91-402D-80AE-FAF39E3E54E9}" __AllowXSLTEditing="true" __designer:CustomXsl="fldtypes_Ratings.xsl" WebPart="true" Height="" Width=""><ParameterBindings>
      <ParameterBinding Name="dvt_sortdir" Location="Postback;Connection"/>
                <ParameterBinding Name="dvt_sortfield" Location="Postback;Connection"/>
                <ParameterBinding Name="dvt_startposition" Location="Postback" DefaultValue=""/>
                <ParameterBinding Name="dvt_firstrow" Location="Postback;Connection"/>
                <ParameterBinding Name="OpenMenuKeyAccessible" Location="Resource(wss,OpenMenuKeyAccessible)" />
                <ParameterBinding Name="open_menu" Location="Resource(wss,open_menu)" />
                <ParameterBinding Name="select_deselect_all" Location="Resource(wss,select_deselect_all)" />
                <ParameterBinding Name="idPresEnabled" Location="Resource(wss,idPresEnabled)" /><ParameterBinding Name="NoAnnouncements" Location="Resource(wss,noitemsinview_doclibrary)" /><ParameterBinding Name="NoAnnouncementsHowTo" Location="Resource(wss,noitemsinview_doclibrary_howto2)" /></ParameterBindings>
    <DataFields>
    </DataFields>
    <XmlDefinition>
    <View Name="{14919DF3-0E91-402D-80AE-FAF39E3E54E9}" MobileView="TRUE" Type="HTML" Hidden="TRUE" DisplayName="" Url="/sites/sitec2/dannitest/SitePages/Test.aspx" Level="1" BaseViewID="1" ContentTypeID="0x" ImageUrl="/_layouts/15/images/dlicon.png?rev=23" ><Query><OrderBy><FieldRef Name="FileLeafRef"/></OrderBy></Query><ViewFields><FieldRef Name="DocIcon"/><FieldRef Name="LinkFilename"/><FieldRef Name="Modified"/><FieldRef Name="Editor"/></ViewFields><RowLimit Paged="TRUE">30</RowLimit><JSLink>clienttemplates.js</JSLink><XslLink Default="TRUE">main.xsl</XslLink><Toolbar Type="Standard"/></View></XmlDefinition>
    </WebPartPages:XsltListViewWebPart>
    
    </div></div></td><td class="ms-wiki-columnSpacing" style="width&#58;49.95%;"><div class="ms-rte-layoutszone-outer" style="width&#58;100%;"><div class="ms-rte-layoutszone-inner" aria-label="Rich text editor">
    			<WebPartPages:XsltListViewWebPart runat="server" ViewFlag="" ViewSelectorFetchAsync="False" InplaceSearchEnabled="False" ServerRender="False" ClientRender="True" InitialAsyncDataFetch="False" WebId="00000000-0000-0000-0000-000000000000" IsClientRender="False" GhostedXslLink="main.xsl" NoDefaultStyle="" ViewGuid="{0C3474A7-2838-4297-B512-71FFFBACBFA8}" EnableOriginalValue="False" ViewContentTypeId="" ListUrl="" ListDisplayName="" ListName="{7F1556FB-F657-4888-9BA5-FD73C07EEEF3}" ListId="7f1556fb-f657-4888-9ba5-fd73c07eeef3" PageSize="-1" UseSQLDataSourcePaging="True" DataSourceID="" ShowWithSampleData="False" AsyncRefresh="False" ManualRefresh="False" AutoRefresh="False" AutoRefreshInterval="60" Title="RFI" FrameType="Default" SuppressWebPartChrome="False" Description="" IsIncluded="True" ZoneID="wpz" PartOrder="3" FrameState="Normal" AllowRemove="True" AllowZoneChange="True" AllowMinimize="True" AllowConnect="True" AllowEdit="True" AllowHide="True" IsVisible="True" CatalogIconImageUrl="/_layouts/15/images/ittask.png?rev=23" TitleUrl="/sites/sitec2/dannitest/Lists/RFI" DetailLink="/sites/sitec2/dannitest/Lists/RFI" HelpLink="" HelpMode="Modeless" Dir="Default" PartImageSmall="" MissingAssembly="Cannot import this Web Part." PartImageLarge="/_layouts/15/images/ittask.png?rev=23" IsIncludedFilter="" ExportControlledProperties="False" ConnectionID="00000000-0000-0000-0000-000000000000" ID="g_e9a0507a_c070_409e_95a5_72b53d545e8c" __MarkupType="vsattributemarkup" __WebPartId="{0C3474A7-2838-4297-B512-71FFFBACBFA8}" __AllowXSLTEditing="true" __designer:CustomXsl="fldtypes_Ratings.xsl" WebPart="true" Height="" Width=""><ParameterBindings>
    <ParameterBinding Name="dvt_sortdir" Location="Postback;Connection" /><ParameterBinding Name="dvt_sortfield" Location="Postback;Connection" /><ParameterBinding Name="dvt_startposition" Location="Postback" DefaultValue="" /><ParameterBinding Name="dvt_firstrow" Location="Postback;Connection" /><ParameterBinding Name="OpenMenuKeyAccessible" Location="Resource(wss,OpenMenuKeyAccessible)" /><ParameterBinding Name="open_menu" Location="Resource(wss,open_menu)" /><ParameterBinding Name="select_deselect_all" Location="Resource(wss,select_deselect_all)" /><ParameterBinding Name="idPresEnabled" Location="Resource(wss,idPresEnabled)" /><ParameterBinding Name="NoAnnouncements" Location="Resource(wss,noXinviewofY_LIST)" /><ParameterBinding Name="NoAnnouncementsHowTo" Location="Resource(core,noXinviewofY_DEFAULT)" /><ParameterBinding Name="AddNewAnnouncement" Location="Resource(wss,addnewitem)" /><ParameterBinding Name="MoreAnnouncements" Location="Resource(wss,moreItemsParen)" /></ParameterBindings>
    <DataFields>
    </DataFields>
    <XmlDefinition>
    <View Name="{0C3474A7-2838-4297-B512-71FFFBACBFA8}" MobileView="TRUE" Type="HTML" Hidden="TRUE" DisplayName="" Url="/sites/sitec2/dannitest/SitePages/Test.aspx" Level="1" BaseViewID="1" ContentTypeID="0x" ImageUrl="/_layouts/15/images/issuelst.png?rev=23" ><Query><OrderBy><FieldRef Name="_Status" Ascending="FALSE"/><FieldRef Name="Date_Initiated" Ascending="FALSE"/></OrderBy></Query><ViewFields><FieldRef Name="LinkTitle"/><FieldRef Name="AssignedTo"/><FieldRef Name="Action_Taken"/><FieldRef Name="Date_Initiated"/><FieldRef Name="_Status"/></ViewFields><RowLimit Paged="TRUE">30</RowLimit><Aggregations Value="Off"/><JSLink>hierarchytaskslist.js</JSLink><XslLink Default="TRUE">main.xsl</XslLink><Toolbar Type="Standard"/></View></XmlDefinition>
    </WebPartPages:XsltListViewWebPart>
    
    <div class="ms-rtestate-read ms-rte-wpbox" ><div class="ms-rtestate-notify  ms-rtestate-read 567f3e4b-ca02-4f77-8954-57f86f9118ed" id="div_567f3e4b-ca02-4f77-8954-57f86f9118ed" unselectable="on"></div><div id="vid_567f3e4b-ca02-4f77-8954-57f86f9118ed" unselectable="on" style="display&#58;none;"></div></div><WebPartPages:ScriptEditorWebPart runat="server" Content="&lt;script type=&quot;text/javascript&quot; src=&quot;https://sof.hq.socom.mil/sites/sitec2/SiteAssets/Dannie%20Test/jquery-1.4.1.min.js&quot;&gt;&lt;/script&gt;
    &lt;script type=&quot;text/javascript&quot; src=&quot;https://sof.hq.socom.mil/sites/sitec2/SiteAssets/Dannie%20Test/PrintArea.js&quot;&gt;&lt;/script&gt;
    
     &lt;SCRIPT type=text/javascript&gt;
            function printPage(idOfWebPart){
                var printElement = document.getElementById(idOfWebPart);
                $(printElement).printArea({mode: &quot;popup&quot;, popClose: false});
            };
    &lt;/SCRIPT&gt;
    
    &lt;input type=button value=&quot;Print Page&quot; onclick=&quot;javascript:printPage(&#39;WebPartWPQ2&#39;);&quot;&gt;
    " Title="Script Editor" Description="Allows authors to insert HTML snippets or scripts." ChromeType="None" ID="g_3faae6b7_e201_416c_83ad_91bee6277d87" __MarkupType="vsattributemarkup" __WebPartId="{07CA7213-CBB0-487F-ACCB-CE97168FCDE4}" WebPart="true" __designer:IsClosed="false"></WebPartPages:ScriptEditorWebPart>
    
    <p>&#160;</p><WpNs0:WebPartTabs runat="server" WebParts="RFI" StabilizeJquery="False" ShowTitlesBelow="False" Title="Web Part Tabs" Description="Displays Selected webparts in a tabular format. Derived from HillbillyTabs and a custom jQuery UI" ChromeType="None" ID="g_1b01f205_153c_43ac_8595_40fc06ad79ac" __MarkupType="vsattributemarkup" __WebPartId="{0AF5F5D1-24F6-4C8A-ADDA-10B258E4A0A8}" WebPart="true" __designer:IsClosed="false"></WpNs0:WebPartTabs>
    
    </div></div></td></tr><tr style="vertical-align&#58;top;"><td colspan="2"><div class="ms-rte-layoutszone-outer" style="width&#58;100%;"><div class="ms-rte-layoutszone-inner" aria-label="Rich text editor"></div>&#160;</div></td></tr></tbody></table><span id="layoutsData" style="display&#58;none;">true,true,2</span></div></SharePoint:EmbeddedFormField>
    	<WebPartPages:WebPartZone runat="server" ID="Bottom" CssClass="ms-hide" Title="loc:Bottom"><ZoneTemplate></ZoneTemplate></WebPartPages:WebPartZone>
    </asp:Content>
    

    Thursday, April 27, 2017 5:38 PM
  • Hi,

    Try to use content editor webpart instead of script editor webpart for this case.

    I tested by OOB wiki page, if insert several web parts and save, edit the page and insert script editor webpart, it would move previous webparts, but if I use content editor web part, seems everything works fine.

    Let me know if this works for you.

    Best Regards,

    Lee


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com


    Friday, April 28, 2017 2:52 AM
  • https://www.dropbox.com/s/hr3755c5duvzclp/Part%202.zip?dl=0
    
    https://www.dropbox.com/s/4l9hjpe84ety8j1/Part1.zip?dl=0

    

    I've created psr, so you can see step by step what I'm doing. Move code in content editor still no go.

    Friday, April 28, 2017 1:04 PM
  • Hi,

    What I understand from your code is that you want to create a layout as below sample:

    Could you test as below:

    Create a wiki page and insert the web parts which you planned to display(include the print function by content editor web part), if this works fine.

    Custom the page layout of the wiki page by SharePoint designer.

    Best Regards,

    Lee


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Tuesday, May 02, 2017 7:59 AM
  • I'm really confused on what your asking. The page is already a wiki page.? When I add the print function inside script editor or content editor with the list with Hillbilly Tabs it still removes the data from the entire Page. 
    Wednesday, May 03, 2017 12:28 PM
  • Hi,

    As your page contains custom web part so I can’t test it in my local.

    <%@ Register TagPrefix="WpNs0" Namespace="SOF.SP13.CommonWebParts.WebParts.WebPartTabs" Assembly="SOF.SP13.CommonWebParts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=60dbce64d76aef5c"%>

    So I want to narrow down the issue.

    Could you try to create a web part page instead of wiki page and check does this works fine?

    Going to your pages library

    Click  FILES tab->New Document->Page

    Create a blank web part page.

    Then, insert the web parts you planned to display.

    If issue still exists, try to remove your custom WebPartTabs web part and try( you could do this by adding ‘?contents=1’ to the page URL, so you could redirect to Web Part Page Maintenance page).

    Best Regards,

    Lee


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com


    Thursday, May 04, 2017 2:03 AM