var x = "www.something.com#something"
ajax("default?q="+x,"","");
Here, in the controller, the value obtained in request.vars is only www.something.com instead of www.something.com#something
Looks like anything written after # is not taken into consideration.
Although it works fine when passed a "name" but not sure why this won't work in the above scenario. Please help.
The #
symbol in a URL represents a fragment, a fragment is not likely to be included in request.vars
so you will need to encode the value q
with something like encodeURIComponent
before sending it in a request.