on 2016 Apr 29 2:02 PM
Hello Gurus,
I think this should be straight forward , So I have index.html file which I call to load my application, Now If I append any other parameters and try that in my browser I get HTTP 404 error.
for e.g. localhost:8080/index.html/?param="XYZ"
So I would like to know what I need to do in my application to enable it to read URL parameters any code example would really be helpful.
Thanks
Somil
Hi Somil,
There is a method in SAPUI5:
var sValue = jQuery.sap.getUriParameters().get("myUriParam");
Check the following method for a detailed explanation:
https://scn.sap.com/thread/3511676
Regards,
Emanuel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well I have gone through that but It doesn't work for me. I am yet to find out why.
Could you please throw some light on where to put this code I have tried to put this in Component.js OnInit() method as well.
I am using Eclipse IDE jetty server and when I hit the URL with /index.html/?param="xyz"
It says HTTP 404
Thanks for your help Emanuel
There are some ways of doing that. Here is an example: http://stackoverflow.com/questions/220231/accessing-the-web-pages-http-headers-in-javascript
User | Count |
---|---|
70 | |
8 | |
8 | |
7 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.