Forum Post: RE: Getting the previous Page's ID

  • Thread starter Thread starter Orchid Corpin
  • Start date Start date
Status
Not open for further replies.
O

Orchid Corpin

Guest
Hi Iramk, I see, here is another option I found, this will let you extract pageId from URL and not from token, in your selector page try the code below. script function getUrlParameter(sParam) { var sPageURL = window.location.search.substring(1); var sURLVariables = sPageURL.split('&'); for (var i = 0; i sURLVariables.length; i++) { var sParameterName = sURLVariables.split('='); if (sParameterName[0] == sParam) { return sParameterName[1]; } } } var pID = getUrlParameter('pageId'); alert("pID: "+pID); /script Credits to: http://stackoverflow.com/questions/19491336/get-url-parameter-jquery Hope this may help. Regards, Orchid

Continue reading...
 
Status
Not open for further replies.
Back
Top