Page 1 of 1

How to pass '#' in url

Posted: Wed Jul 25, 2012 10:16 pm
by lvidya
Hi, I have to pass a variable which contains the '#' character through javascript to another php page, for example resource#001 but it only gets the 'resource' but not the #001 pls HELP.

Re: How to pass '#' in url

Posted: Thu Jul 26, 2012 2:47 pm
by iam4423
The problem is that the # character defines an anchor, for example if you were to skip to a specific section on a webpage! I'm not too sure as I have never tried to pass a # as part of a get but there are two ways in which you might be able to do this: firstly and most likely would be to pass the HTML code for the symbol (provided that there is one)

secondly you could try writing it as \# tho I getting doubt that will work!

when I next have access to a computer I'll give it a go and see what o can work out but to be honest I wouldn't be holding my breath!

Re: How to pass '#' in url

Posted: Fri Jul 27, 2012 1:27 am
by lvidya
oh, thanx for your reply. let me give a try.

Re: How to pass '#' in url

Posted: Mon Jul 30, 2012 4:02 am
by iam4423
id forgetten to give this a try, did you manage to get it working or did you have to remove the # from your url's?

Re: How to pass '#' in url

Posted: Tue Jul 31, 2012 12:59 am
by lvidya
Hai, I just removed the '#' bcz i have less time to complete the project. Anyway thanx for your reply.
:D