I created an SharePoint Hosted App in this app I am using Two form for saving data into list. When I click on save button to save data into list data is saved into list and redirect to another page that have another form to save data into list but facing the error on that page-
Uncaught TypeError: Cannot read property 'split' of undefined dut to fail querystring parameter
I am using the following code to access appweburl and hostweburl-
hostweburl = decodeURIComponent(getQueryStringParameter("SPHostUrl"));
appweburl = decodeURIComponent(getQueryStringParameter("SPAppWebUrl"));
var scriptbase = hostweburl + "/_layouts/15/";
var context = new SP.ClientContext(appweburl);
appContextSite = new SP.AppContextSite(context, hostweburl);
web = appContextSite.get_web();
What I have to do to fix this issue , please suggest anyone. Thanks in advance