How to pass '#' in url

Javascript coding ..

Moderators: macek, egami, gesf

lvidya
New php-forum User
New php-forum User
Posts: 37
Joined: Wed Jun 20, 2012 3:20 am

How to pass '#' in url

Postby lvidya » Wed Jul 25, 2012 10:16 pm

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.

iam4423
New php-forum User
New php-forum User
Posts: 50
Joined: Fri Jan 20, 2012 8:00 am

Re: How to pass '#' in url

Postby iam4423 » Thu Jul 26, 2012 2:47 pm

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!

lvidya
New php-forum User
New php-forum User
Posts: 37
Joined: Wed Jun 20, 2012 3:20 am

Re: How to pass '#' in url

Postby lvidya » Fri Jul 27, 2012 1:27 am

oh, thanx for your reply. let me give a try.

iam4423
New php-forum User
New php-forum User
Posts: 50
Joined: Fri Jan 20, 2012 8:00 am

Re: How to pass '#' in url

Postby iam4423 » Mon Jul 30, 2012 4:02 am

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?

lvidya
New php-forum User
New php-forum User
Posts: 37
Joined: Wed Jun 20, 2012 3:20 am

Re: How to pass '#' in url

Postby lvidya » Tue Jul 31, 2012 12:59 am

Hai, I just removed the '#' bcz i have less time to complete the project. Anyway thanx for your reply.
:D


Return to “JavaScript”

Who is online

Users browsing this forum: Baidu [Spider] and 1 guest

cron