Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
MailManUSA #1
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¤tDir=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¤tDir=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
-
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... -
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... -
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)? -
[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 -
£ 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... -
MailManUSA #2
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
-
sbufe #3
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



Reply With Quote

