Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / ColdFusion / Advanced Techniques / January 2007



Tip: Looking for answers? Try searching our database.

Replacing "+" in url variable to spaces

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Petro_ - 31 Jan 2007 15:24 GMT
Hello, thanks in advance for your help.

I want to pass a url variable as a title for a page.  I want to separate the
words with a "+" in the url.. then when I output it on the webpage, I want to
"+" to get replaced with spaces.  Is there a function that will do that?

Thanks, Steve
mikozak - 31 Jan 2007 16:55 GMT
Why bother using plus signs as word separators?  Use blanks.  Before you put
the title into the URL, use the function URLEncodedFormat() to encode the
spaces.

If that does not work for your application some reason (such as the text is
already delimited with plus signs when you get it), you can use the Replace()
function to change the plus signs to spaces before you display the title.
Petro_ - 31 Jan 2007 17:02 GMT
Mike, thanks for the reply... I was just trying to get pointed in the right direction.  I'm going to look into the replace () function.

Steve
Dinghus - 31 Jan 2007 18:51 GMT
Many search applications use the "+" delimiter for the search term in the URL.  So this isn't that uncommon.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.