SP2010 cascading lists with jquery

Source: Internet
Author: User

?

Use Spservice 's spcascadedropdowns to achieve.

can refer to http://www.cnblogs.com/Sunmoonfire/archive/2010/09/11/1823678.html to implement.

  1. Download Spservice JS package, get from http://spservices.codeplex.com/
  2. download jQuery js package, get from www.jquery.com , recommend 1.10 or above version
  3. will be Spservice and jQuery packages are uploaded to a SharePoint site's document library, such as the site Asset Library
  4. first verify that the uploaded JS package is available, refer to http://sympmarc.com/2011/07/08/ adding-jqueryspservices-to-a-sharepoint-page-step-one-always/
  5. Create Country and state site columns, and added to the list or document library to which you want to use cascading
  6. Open the list of NewForm.aspx page, can be opened directly in IE , such as http://SPServer/List/NewForm.aspx
  7. Click Site Actions, edit page, add a Content Editor webpart, click the Content Editor's content box, select Html-> on the Ribbon to edit the HTML source code
  8. Create a list that needs to be cascaded, such as Country,state, where the state list contains country 's Lookup bar

    1. Enter the following JS script in the popup dialog box

<script language= "javascript" src= "/siteassets/jquery-1.10.2.js" type= "Text/javascript" ></script>

<script language= "javascript" src= "/siteassets/jquery. Spservices-2014.01.min.js "type=" Text/javascript "></script>

<script language= "javascript" type= "Text/javascript" >

$ (document). Ready (function ()

{

$(). Spservices.spcascadedropdowns (

{

Relationshipweburl: "/",

Relationshiplist: "State",

Relationshiplistparentcolumn: "Country",

Relationshiplistchildcolumn: "Title",

ParentColumn: "Country",

Childcolumn: "State",

Debug:true

});

});</script>

    1. Create a new project that should now be available in the native The Cascade list item is implemented in the Form.

SP2010 cascading lists with jquery

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.