By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,071 Members | 1,244 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,071 IT Pros & Developers. It's quick & easy.

%23 and #, which should I be worried about?

P: n/a
Hi,

I'm using the '#' character to concatenate some information to the
URL. For example:

filtrado3.jsp?estatus=Certificado&valor=Certificad o&campo=estatus&ca=ejecutivo#tipo&va=Daniel+Perez# CONC.

But, when I see the URL, it's something like this:

filtrado3.jsp?estatus=Certificado&valor=Certificad o&campo=estatus&ca=ejecutivo%23tipo&va=Daniel+Pere z%23CONC.

I must access to "ca" and "va" values. I've been considering that the
real character is '#', but nothing happens. And, when I try to
consider the "%23" string, nothing happens. What am I doing wrong?

TIA.
Jul 23 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
I'd stop using # or you're gonna have to decode the url. Certain
characters are encoded by the browser when they are placed in an url.
Like I think space is %20. Try using dash(-) or '.'

Jul 23 '05 #2

P: n/a

"Omar" <ro*****@yahoo.com> wrote in message
news:8b**************************@posting.google.c om...
Hi,

I'm using the '#' character to concatenate some information to the
URL. For example:

filtrado3.jsp?estatus=Certificado&valor=Certificad o&campo=estatus&ca=ejecuti
vo#tipo&va=Daniel+Perez#CONC.
But, when I see the URL, it's something like this:

filtrado3.jsp?estatus=Certificado&valor=Certificad o&campo=estatus&ca=ejecuti
vo%23tipo&va=Daniel+Perez%23CONC.
I must access to "ca" and "va" values. I've been considering that the
real character is '#', but nothing happens. And, when I try to
consider the "%23" string, nothing happens. What am I doing wrong?

In URL parlance, the '#' denotes a location within the page, so this
is an invalid URL (my opinion ;-))
I don't see why you need the '#' anyway, so why?

Hex 23 is the '#' character in ASCII.
Are you saying it is not there so nothing happens?
If it is there, how do you try to access it?
Jul 23 '05 #3

P: n/a
Robert wrote:

[Quotation added. Please quote relevant
material when responding to a post.]
Omar wrote:
I'm using the '#' character to concatenate some information to the
URL.


I'd stop using # or you're gonna have to decode the url. [...] Try
using dash(-) or '.'


There are several characters that the OP could choose from. Hyphens (-),
underscores (_), dots (.), exclamation marks (!), tildes (~), asterisks
(*), apostrophes ('), and parentheses () are all considered to be
unreserved within URLs. A hash (#), however, is reserved for separating
the fragment identifier and the rest of the URL.

Mike

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
Jul 23 '05 #4

P: n/a
Omar wrote:
I'm using the '#' character to concatenate some information to the
URL.
You are not allowed to. According to RFC 2396 "Uniform Resource
Identifiers", the `#' character delimits the fragment ID in an URI.
Unless there is a fragment with that ID in the target resource
addressed by the URI, it must not be used (uncoded). Use query part
components for that instead, delimited with `&' and encoded properly.

I wonder what this has to do with JavaScript or Java.
And do you know that those are different languages?
I must access to "ca" and "va" values. I've been considering that the
real character is '#', but nothing happens. And, when I try to
consider the "%23" string, nothing happens. What am I doing wrong?


You do not take heed of Internet standards.
PointedEars
Jul 23 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.