0

I am sending over a parameter id over to this URL,

window.location = "/Payroll/client/index.html#Application.html?id="+applicationId;

however when I tried to use:

console.log(location.search.substring(1));

nothing appeared.

May I know how do I get the parameter from this URL especially when this URL is index.html#Application.html

chiwangc
  • 3,566
  • 16
  • 26
  • 32
Ugine
  • 143
  • 8
  • possible duplicate of [How to retrieve GET parameters from javascript?](http://stackoverflow.com/questions/5448545/how-to-retrieve-get-parameters-from-javascript) – MaxZoom May 27 '15 at 02:19
  • 1
    that's an improperly formed URL. As far as the browser is concerned, that "query string" is part of the hash/fragment. hash/fragment component should go after query string component. `window.location = "/Payroll/client/index.html?id="+applicationId+"#Application.html";` – CrayonViolent May 27 '15 at 02:58
  • Hi all, thanks for your help. Manage to debug this already. – Ugine May 29 '15 at 04:10

0 Answers0