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>

    18 hours 47 minutes ago
  • 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

    4 hours 11 minutes ago