here is how we have been getting around the secret url issue. 1. put a <script src="urls.cfm"></script> 2. in the script check to see if the page loading the script is equal to referrer. 3. put all of the window.open code inside of functions or how ever you want to wrap it up. 4 make the links in your page call the appropriate function to set location.href or window.open or what ever.
If the user tries to download the cfm file referenced in the script src he/she will not be the correct referrer and your coded will redirect them or what ever you want to do. Hope that helps. Bryan LaPlante ----- Original Message ----- From: "Keith Purtell" <[EMAIL PROTECTED]> To: "KCFusion (E-mail)" <[EMAIL PROTECTED]> Sent: Wednesday, January 22, 2003 5:48 PM Subject: [KCFusion] Encrypted URL and JS > I'm trying to encrypt a URL. The problem is I keep getting JS error "Unterminated String Constant" > when I click the hyperlink that is supposed to call the window. This worked fine before I started > trying to protect the file path by encrypting. Here is a snippet of my code ... > > <cfset string = "/dirone/dirtwo/filename.pdf"> > <cfset key = "alpha123"> > <cfset encrypted = URLEncodedFormat(Encrypt(string, key))> > <CFOUTPUT> > <A HREF="javascript:openWindow('download.cfm?FilePath=#encrypted#')">Click here</A> > </CFOUTPUT> > > Did some research and only found one vague reference at the Macromedia web forums. That person > supposedly solved this problem by using an obsolete CF function. > > Keith Purtell, Web/Network Administrator > VantageMed Operations (Kansas City) > Email: [EMAIL PROTECTED] > > CONFIDENTIALITY NOTICE: This email message, including any attachments, is for the sole use of the > intended recipient(s) and may contain confidential and privileged information. Any unauthorized > review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please > contact the sender by reply email and destroy all copies of the original message. > > --- > [This E-mail scanned for viruses by Declude Virus] > > > > ______________________________________________________________________ > The KCFusion.org list and website is hosted by Humankind Systems, Inc. > List Archives........ http://www.mail-archive.com/cf-list@kcfusion.org > Questions, Comments or Glowing Praise.. mailto:[EMAIL PROTECTED] > To Subscribe.................... mailto:[EMAIL PROTECTED] > To Unsubscribe................ mailto:[EMAIL PROTECTED] > > ______________________________________________________________________ The KCFusion.org list and website is hosted by Humankind Systems, Inc. List Archives........ http://www.mail-archive.com/cf-list@kcfusion.org Questions, Comments or Glowing Praise.. mailto:[EMAIL PROTECTED] To Subscribe.................... mailto:[EMAIL PROTECTED] To Unsubscribe................ mailto:[EMAIL PROTECTED]