Need to preserve slashes in URL variable

Posted on 2006-04-19
Last Modified: 2013-12-24
I am trying to make a link a little more fancy looking on my site so I thought I'd do the same thing by using a "Button".  It seems that when I use the "button" method to pass a path back to the control CFM, I lose my slashes.  Any thoughts on how to preserve the slashes in my path?

<cfset path = "C:\sharedfiles\mfg\qc">
<!--- Method 1 - Works --->
<a href="crmDocMgrMainControl.cfm?up=#path#">Move up one level</a>
<!--- Method 2 - DOES NOT Work --->
<input type="button" name="MoveUpOneLevel" value="Move up one level" class="ButtonBorder3" style="width:125px;" onClick="location.href='crmDocMgrMainControl.cfm?up=#path#'">

<!--- Results of Method 1 --->
url.up is C:\sharedfiles\mfg\qc

<!--- Results of Method 2 --->
url.up is C:sharedfilesmfgqc
Question by:sulzener
    LVL 7

    Expert Comment

    <cfset path = "C:\\sharedfiles\\mfg\\qc">

    Author Comment

    I just loaded that variable for purposes of asking the question.  To do that would mess up my entire logic and would just have to leave it as is.  Is there a way to preserve the slashes?  Why are they being removed?
    LVL 36

    Accepted Solution

    maybe try


    Author Comment

    Thanks Sidfishes.  I knew there had to be a way!

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Suggested Solutions

    This is a guide to setting up a new WHM/cPanel Server to be used for web hosting accounts. It is intended for web hosting company administrators and dedicated server owners. For under $99 per month (considering normal rate of Big Data Cetnters like …
    In our day to day coding, how many times have we come across a necessity to check whether a URL is a broken link or not? For those of you that answered countless and are using ColdFusion like myself, then this article is for you.  It will show yo…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now