Popular Posts
javax.net.ssl.SSLHandshakeException: Connection closed by peer in Android 5.0 Lollipop Recently, there is a error occurs when access website via ssl connection like below although it worked fine several days ago. // Enable SSL... Tired of Hibernate? Try JDBI in your code JDBI Quick sample ICategoryDAO.java : create a data access interface (implement is not required) package com.prhythm.erotic.task.data.... filetracker error ftk1011 FileTracker error: ftk1011 : an error occurs on converting project from visual studio 2008(or under?) to visual studio 2010, and with some ...
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;
        }
    }
};