Created
January 23, 2013 17:59
-
-
Save vgrem/4611065 to your computer and use it in GitHub Desktop.
Set value for TaxonomyWebTaggingControl control
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Set Taxonomy ControlObject value | |
//webTaggingId - TaxonomyWebTaggingControl ID | |
//termValue - represents a single value held in a TaxonomyField object using the following format: NameOfTerm|GUIDOfTerm | |
function setTaxonomyControlObjectValue(webTaggingId, termValue) { | |
var webTaggingCtl = $get(webTaggingId); | |
var taxCtlObj = new Microsoft.SharePoint.Taxonomy.ControlObject(webTaggingCtl); | |
taxCtlObj.enableControl(true); | |
taxCtlObj.setRawText(termValue); | |
taxCtlObj.retrieveTerms(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment