zoukankan      html  css  js  c++  java
  • Print List Item With InfoPath Form

    As we all know,if we change display form of a list item to infopath form,there can't find the print preview button on the ribbon:

    If we want to print this form, we need to add a print button,but how to do it,just follow the following steps:

    First,trun back to the list,on the ribbon area,click "List"-"Modify Form Webparts",choose "(Item) Display Form":

    Then,click "Add Webpart" on the page area,select "Media and Content"-"Content Editor Webpart",click "Add":

    Then,modify the content editor webpart,click "Modify Html Code":

    Add the following code:

    View Code
     1 <script src="/_layouts/jquery.min.js" type="text/javascript"></script>
    2 <script src="/_layouts/jquery.PrintArea.js" type="text/javascript"></script>
    3
    4 <script type="text/javascript">
    5 $(document).ready(function () {
    6 $("#print_button").click(function(){
    7 $("#WebPartWPQ2").printArea();
    8 });
    9 });
    10 </script>
    11 <input id="print_button" type="button" value="打 印"/>

    Before we do this,we should add "jquery.min.js" and "jquery.PrintArea.js" to this folder on SharePoint Server:"C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\","jquery.PrintArea.js" can be downloaded from the internet.

    "WebPartWPQ2" is the area id we want to print.

  • 相关阅读:
    scp远程文件传输
    ssh远程登录
    PHP PDO使用
    Linux引导流程
    Samba服务器搭建
    linux ftp服务器搭建
    NfS服务的搭建
    Discuz! X2.5数据库字典【转载】
    javaSctipt基础
    压缩文件 compress files 以7z 格式及解压 或者别的格式
  • 原文地址:https://www.cnblogs.com/leolis/p/2366923.html
Copyright © 2011-2022 走看看