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;
$().SPServices({
operation: "GetChildTermsInTermSet",
sspId: termStore,
lcid: 1033,
termSetId: termSet,
completefunc: function (xData, Status) {
alert("ok");
}
});
return name;
}
not even the alert message is displaying