Posted By

scholli on 02/25/11


Tagged

script client sharepoint


Versions (?)

Get Sub Webs


 / Published in: JavaScript
 

  1. var context = SP.ClientContext.get_current();
  2. var webs = context.get_web().get_webs();
  3. context.load(webs);
  4. context.executeQueryAsync(function (sender, args) {
  5. var webEnum = webs.getEnumerator();
  6. while (webEnum.moveNext()) {
  7. var web = webEnum.get_current();
  8. alert(web.get_title());
  9. }
  10. }, function () {
  11. alert('err');
  12. });

Report this snippet  

You need to login to post a comment.