Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Javascript (http://www.velocityreviews.com/forums/f68-javascript.html)
-   -   %23 and #, which should I be worried about? (http://www.velocityreviews.com/forums/t917784-23-and-which-should-i-be-worried-about.html)

Omar 04-26-2005 05:38 PM

%23 and #, which should I be worried about?
 
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.

Robert 04-26-2005 06:25 PM

Re: %23 and #, which should I be worried about?
 
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 '.'


Betty 04-26-2005 06:27 PM

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

"Omar" <ro_omar@yahoo.com> wrote in message
news:8b974ca4.0504260938.2d6580b1@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?



Michael Winter 04-26-2005 06:35 PM

Re: %23 and #, which should I be worried about?
 
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.

Thomas 'PointedEars' Lahn 05-08-2005 02:55 PM

Re: %23 and #, which should I be worried about?
 
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


All times are GMT. The time now is 06:32 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.