<SCRIPT type=text/javascript src="/Style%20Library/ReadSubsites/jquery-1.11.1.js"></SCRIPT>
<SCRIPT type=text/javascript src="/Style%20Library/ReadSubsites/jquery.SPServices-0.7.2.min.js"></SCRIPT>
<SCRIPT type=text/javascript>
var thisSite = $().SPServices.SPGetCurrentSite();
get();
function get() {
$().SPServices
({
operation: "GetWebCollection",
webURL: $().SPServices.SPGetCurrentSite().toString(),
async: false,
completefunc: function (xData, status) {
document.write("<table width='100%'>");
var a = 0;
$(xData.responseXML).find("Web").each(function () {
a++;
var webtitle = $(this).attr("Title");
var weburlvar = $(this).attr("Url");
var webdesc = $(this).attr("Description");
document.write("<tr><td><a target='_blank' href='" +
weburlvar + "'>" + webtitle + "</a></td></tr>");
});
if (a < 1) {
document.write("<tr><td><font><b>No Site
Found</b></font></td></tr>");
}
document.write("</table>");
}
});
}
</script>
No comments:
Post a Comment