# in query string is terminating rest of the parameters

I am trying to find particular parameter in is present in URL or not. If yes stores it in cookie. I am using below line of code to find the parameter and it works fine:

var vals = document.location.search
start = vals.indexOf(“myID”);

but above code is ot working when we have one # inbetween the URL for ex:

http://www.example.com/faq/sID.33[COLOR=“Red”]#[/COLOR]?&uID=1234&myID=ABCD1234

I have observed when I remove “#” from the URL it works but not for #.

Can yo please explain why so and any fix for such situation?

is a special character used to identify a bookmark on a page.

but it is # terminating rest of the parameters in query string…? and i am unable to track them

Alternative (old school) way of getting the querystring in JS. :slight_smile:

http://www.google.co.uk/search?q=html+%23+bookmark+javascript+querystring