Popular Posts
Word break tag : <wbr/> (HTML5) The  HTML  <wbr>  tag  is  used  defines  a  potential  line  break  point  if  needed.  This  stands  for  Word  BReak. This  is  u... Enable SSL connection for Jsoup import org.jsoup.Connection; import org.jsoup.Jsoup; import javax.net.ssl.*; import java.io.IOException; import java.security.KeyManagement... File operation at SMB / UNC (network neighborhood) import java.io.IOException; import java.io.OutputStreamWriter; import jcifs.Config; import jcifs.smb.SmbFile; import jcifs.smb.SmbFileOutpu...
Stats
JSRequest, Get parameters from querystring with javascript in SharePoint

Provides method to parse query string, filename, and pathname from URL

// Initialize first
JSRequest.EnsureSetup();

// Get the current file name
JSRequest.FileName: "qa.aspx"
// Get the current path name
JSRequest.PathName: "/sites/BruceDev/SitePages/qa.aspx"
// Get request query string parameter
JSRequest.QueryString["dy"];
JSRequest
JSRequest = {
    QueryString: null,
    FileName: null,
    PathName: null,
    EnsureSetup: function () {
        if(JSRequest.QueryString != null) return;
        JSRequest.QueryString = new Array();
        var queryString = window.location.search.substring(1);
        var pairs = queryString.split("&");
        for(var i = 0; i < pairs.length; i++) {
            var p = pairs[i].indexOf("=");
            if(p > -1) {
                var key = pairs[i].substring(0, p);
                var value = pairs[i].substring(p + 1);
                JSRequest.QueryString[key] = value;
            }
        }
        var path = JSRequest.PathName = window.location.pathname;
        var p = path.lastIndexOf("/");
        if(p > -1) {
            JSRequest.FileName = path.substring(p + 1);
        } else {
            JSRequest.PageName = path;
        }
    }
};