cancel
Showing results for 
Search instead for 
Did you mean: 

how to get browser's url parameter at controller

janaka1984
Star Contributor
Star Contributor

hi,

how can i get browser's url parameter (searchTerm) at controller of  aikau site page

http://127.0.0.1:8080/share/page/site/test/hdp/ws/components/test-page#scope=all_sites&searchTerm=mo...

Regards

janaka

1 REPLY 1

afaust
Legendary Innovator
Legendary Innovator

You simply cannot in the server side JavaScript web script controller. Such URL hashes are only available on the client-side. They are used to encode state of widgets and are sometimes used to pre-initialise the state of widgets as well. There should generally be no need to handle these in web script controllers other than enabling hash detection / analysis in the relevant widgets, which will retrieve the value upon client-side instantiation (when the page is loaded in the browser).