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

O

Omar

Hi,

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

filtrado3.jsp?estatus=Certificado&valor=Certificado&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=Certificado&campo=estatus&ca=ejecutivo%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?

TIA.
 
R

Robert

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 '.'
 
B

Betty

Omar said:
Hi,

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

filtrado3.jsp?estatus=Certificado&valor=Certificado&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=Certificado&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?
 
M

Michael Winter

Robert wrote:

[Quotation added. Please quote relevant
material when responding to a post.]
Omar said:
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
 
T

Thomas 'PointedEars' Lahn

Omar said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top