TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Get Query String Parameter in Sharepoint App
Sushant Kesari
Oct 06
2015
Code
2
k
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
$(document).ready(
function
() {
//Get the URI decoded SharePoint site url from the SPHostUrl parameter.
var
spHostUrl = decodeURIComponent(getQueryStringParameter(
'SPHostUrl'
));
var
appWebUrl = decodeURIComponent(getQueryStringParameter(
'SPAppWebUrl'
));
var
spLanguage = decodeURIComponent(getQueryStringParameter(
'SPLanguage'
));
});
function
getQueryStringParameter(paramToRetrieve) {
var
params =
document.URL.split(
"?"
)[1].split(
"&"
);
for
(
var
i = 0; i < params.length; i = i + 1) {
var
singleParam = params[i].split(
"="
);
if
(singleParam[0] == paramToRetrieve)
return
singleParam[1];
}
}
SharePoint
J-Query
Sharepoint App