SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have added terms in termset and need to loopthrough the terms in javascript to get the array of terms. so i used spservice. but not working

 function GetTerm() {
   var termStore = document.getElementById('<%=TermStoreID.ClientID=%>').value.toString();
    var termSet = document.getElementById('<%=TermSetID.ClientID %>').value.toString();
    var name = new Array();
   var index = 0;
        operation: "GetChildTermsInTermSet",
        sspId: termStore,
        lcid: 1033,
        termSetId: termSet,
        completefunc: function (xData, Status) {
    return name;

not even the alert message is displaying

share|improve this question
what are you trying to do? There might be better solutions... – Anders Rask Apr 25 '12 at 11:02
i need to get the terms in the term set and store in array. – yogesh Apr 25 '12 at 13:46
Are you certain the termStore and termSet variables comes back with the correct guid? – Johnny Tordgeman Apr 25 '12 at 13:59
the guid is correct but the service is not triggerring. – yogesh Apr 25 '12 at 14:27
I need to query out all the 1st level terms of a termset and store in array. Did you fix your code? Could you give me an example if possible? – Mark May 20 at 8:28

From the sounds of it, you need to do some debugging. If "the service is not triggerring", there is likely an error of some sort.

First check to make sure your references to jQuery and SPServices are correct (this causes a suprising majority of first time issues). See my post Adding jQuery+SPServices to a SharePoint Page: Step One, Always.

Assuming that your references are good, add alert(xData.responseText); in the completefunc to see what's returned from the Web Service call.


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.