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

Discussion in 'Javascript' started by Omar, Apr 26, 2005.

  1. Omar

    Omar Guest

    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.
    Omar, Apr 26, 2005
    #1
    1. Advertising

  2. Omar

    Robert Guest

    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 '.'
    Robert, Apr 26, 2005
    #2
    1. Advertising

  3. Omar

    Betty Guest

    "Omar" <> wrote in message
    news:...
    > 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?
    Betty, Apr 26, 2005
    #3
  4. 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.
    Michael Winter, Apr 26, 2005
    #4
  5. 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
    Thomas 'PointedEars' Lahn, May 8, 2005
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Omar
    Replies:
    4
    Views:
    425
    Thomas 'PointedEars' Lahn
    May 8, 2005
  2. alex
    Replies:
    2
    Views:
    291
  3. alex

    Gates thinks Google should be worried!

    alex, Mar 7, 2007, in forum: C Programming
    Replies:
    4
    Views:
    307
    Malcolm McLean
    Mar 10, 2007
  4. jmDesktop

    I am worried about Python 3

    jmDesktop, Apr 9, 2008, in forum: Python
    Replies:
    13
    Views:
    508
    Roy Smith
    Apr 10, 2008
  5. Shannon

    Should I be worried...

    Shannon, Feb 28, 2009, in forum: VHDL
    Replies:
    2
    Views:
    426
    Shannon
    Mar 2, 2009
Loading...

Share This Page