0

I have a sharepoint hosted app, I need to redirect the user from starting page to another page on button click.

I want to know how can I pass all the tokens in {StandardToken}. Do I have to manually create these query string or there is any easy way?

Ex: https://server/a.aspx?SPHostUrl=http://server/b.aspx&SPLanguage=en

1

You can try document.URL.split("?")[1] to get the tokens and append it to redirect page url.

| improve this answer | |
  • so I have to do it manually. – nbi Aug 3 '15 at 4:07
0

You have to pass the query string manually. There isn't an easy/build in way.

| improve this answer | |
0

Script to get the current page URL/pass the query string from the SharePoint hosted apps

var currentPageURL = (window.location != window.parent.location) ? document.referrer : document.location;

Script to get the current page URL/pass the query string from the Provider hosted app you can use PostMessage API concept

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.