Pound signs in a URL

Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.

  1. #1

    Default Pound signs in a URL

    Hi,

    Let's say for instance, I have an URL such as:


    [url]www.mysite.com/root/programming/cfdirectory.cfm?debug=0&currentDir=dir3_C#Help&d[/url]
    epth=2

    I created a ColdFusion application that allows users to dynamically browser
    the contents of a particular section of my website. The way it works is, the
    user sits on one and ONLY one webpage (ie, cfdirectory.cfm). They navigate
    backward (Root \ ... \ currentDir) via bread crumbs I conveniently layed out
    accross the top of the page.

    The way I determine which folder contents to display is, I take the current
    value in URL.currentDir and concatenate that with the variable:

    <cfset sz_currentDir = Replace( CGI.PATH_TRANSLATED, ListLast(CGI.SCRIPT_NAME,
    "/"), "", "one" )>

    Then I do the <cfdirectory .... directory="sz_currentDir" ...> to get a query
    of all the files in the current folder (URL.currentDir).

    My question is, how can I get he pound sign out of the URL? When I look at
    the QUERY_STRING value, I get everything up until the "#" sign; for example, I
    can see "debug=0&currentDir=dir3_C " fine, however, "#Help&depth=2" is
    missing. I'm thinking there's something more to it...maybe a session variable
    would be more appropriate?

    I've searched the macromedia board to no avail. Any ideas?

    Adam

    MailManUSA Guest

  2. Similar Questions and Discussions

    1. Problem with pound signs in a query string
      I have a form with an address field in which the user may enter a pound sign for an address number. That form is submitted and the page that...
    2. removing unnecessary pound signs
      Are there any automated tools for removing unnecessary pound signs from coldfusion files? I hate pound signs around variables in cfif and cfset...
    3. equation signs
      how can i copy an equation from word equation editor in freehand without problems? or is it possible to type/put equation signs (like square root)?
    4. [PHP] XX outputting X signs
      Would it not make sese to store the number as a decimal and have the '£' added at output? George, in Oxford, where £££=pints
    5. £ outputting £ signs
      Hello all Can someone tell me where i am going wrong here. I am trying to echo a '£' to the screen which has come from a database field. I get the...
  3. #2

    Default Re: Pound signs in a URL

    Okay, for the record, I recoded the entire application to replace the effort of
    grabbing the current "relative" directory from the CGI.QUERY_STRING variable
    with dynamic session variables. By doing so, I eliminate the user's ability to
    scramble the URL which in turn would throw exception errors throughout my code.
    If you have any questions as to how I went about structuring this
    functionality, email me or reply to this thread. The more ideas that are
    thrown around, the more options there are as far as approaching a particular
    task.

    Also, I am still very interested to find out if there's any way around the "#"
    sign in the QUERY_STRING.


    Regards and much thanks in advance,

    Adam

    MailManUSA Guest

  4. #3

    Default Re: Pound signs in a URL

    The pound sign is a special character in URLs. It signifies the beginning of
    an internal anchor (<a name="hello">), which is only supposed to come after the
    URL vars are all done.
    Try wrapping the directory name in URLEncodedFormat() before you put it in the
    URL. That should escape out the # sign.
    Sierra Bufe
    Brighter Fusion

    sbufe Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139