You don't need to use the urldecode function in the enc2.cfm file.

----- Original Message -----
From: James Blaha <[EMAIL PROTECTED]>
Date: Friday, October 18, 2002 10:03 am
Subject: Re: Issue: urlencodedformat doesn't want to decrypt ce rtain values.

> Thanks, but it didnt work.
> 
> James Blaha
> 
> [EMAIL PROTECTED] wrote:
> 
> >The problem is that Javascript also has it's own set of escape 
> characters.>
> >So, you need to do something like:
> >
> 
>>>onclick="javascript:BoogieOn('enc2.cfm?URL_Encryption=#jsStringFormat(urlencodedformat(Standard_Encryption))#');">
> >
> >----- Original Message -----
> >From: James Blaha <[EMAIL PROTECTED]>
> >Date: Friday, October 18, 2002 8:47 am
> >Subject: Issue: urlencodedformat doesn't want to decrypt certain 
> values.>
> >  
> >
> >>All:
> >>
> >>Issue: urlencodedformat doesn't want to decrypt certain values.
> >>
> >>Below I pasted sample code of my issue. I need to pass and 
> >>encrypted 
> >>value to a link and open a new window using the JAVA script in 
> the 
> >>sending cfm page. I'm using a framed page and the JAVA script 
> >>seems to 
> >>be the only way to make it cross browsers for IE and Netscape 4. 
> >>My 
> >>issue is when certain values seem to be passed via the URL they 
> >>don't 
> >>want to be decrypted. Can anyone please help me out? I've looked 
> >>at the 
> >>documentation for this and I cant see what I'm doing wrong.
> >>
> >>Regards,
> >>James Blaha
> >>
> >>
> >><!--- Begin CFM page 1 enc.cfm --->
> >>
> >><HTML>
> >><HEAD>
> >><TITLE>Test</TITLE>
> >><META http-equiv="Content-Type" content="text/html; charset=iso-
> >>8859-1">
> >>
> >><script language="javascript">
> >>
> >>// Window Options, top and left (IE) uses screenY and screenX 
> for (NS)
> >>// This allows you to position the window location on the screen 
> >>in pixels.
> >>
> >>function BoogieOn(aURL) {
> >>       NextWindow=window.open("", "NextWindow", 
> 
>>>'width=700,height=500,left=1,top=200,screenX=1,screenY=200,toolbar=yes,location=yes,menubar=yes,scrollbars=yes,resizable=yes,')
> >>       NextWindow.document.location=aURL;
> >>}
> >>
> >></script>
> >>
> >></HEAD>
> >><BODY topmargin="0" leftmargin="0" bgcolor="yellow">
> >>
> >><cfform action="enc2.cfm" name="test" method="POST">
> >>
> >><!--- Does not work with values like 102, 112, 122, 132 & 142 --->
> >><cfset ID = 123>
> >><cfset KEY = "Mik">
> >>
> >><cfset Standard_Encryption = encrypt(ID, KEY)>
> >>
> >><cfoutput>
> >><h3>Encrypted Value:</h3>
> >><h2><strong>#ID#</strong></h2>
> >>
> >><h3>Standard Encryption:</h3>
> >><h2><strong>#Standard_Encryption#</strong></h2>
> >></cfoutput>
> >>
> >>
> >><cfset URL_Encryption = #urlencodedformat(ID)#>
> >><cfset URL_Encryption_Standard = 
> >>#urlencodedformat(Standard_Encryption)#>
> >><cfoutput>
> >><!---
> >><h3>URL Encryption:</h3>
> >><h2><strong>#URL_Encryption#</strong></h2>
> >>--->
> >>
> >><h3>URL &amp; Standard Encryption:</h3>
> >><h2><strong>#URL_Encryption_Standard#</strong></h2>
> >></cfoutput>
> >>
> >><br><br>
> >>
> >>
> >><cfoutput>
> >><div align="center"> 
> 
>>>onclick="javascript:BoogieOn('enc2.cfm?URL_Encryption=#urlencodedformat(Standard_Encryption)#');"><b><font
> size="5">Link #ID#-(#URL_Encryption_Standard#)</font></b></div>
> >></cfoutput>
> >>
> >>
> >></cfform>
> >>
> >></BODY>
> >></HTML>   
> >>
> >><!--- End CFM page 1 enc.cfm --->
> >>
> >>
> >><!--- Begin CFM page 2 enc2.cfm --->
> >>
> >><cfset decrypted = decrypt(URLDecode(URL_Encryption), "Mik")>
> >>
> >><cfoutput>
> >><h3>URL &amp; Standard Encryption Decypted: 
> >><strong>#decrypted#</strong></h3><br><br>
> >></cfoutput>
> >>
> >><!--- End CFM page 2 enc2.cfm --->
> >>
> >>
> >>
> >>
> >>
> >>    
> >>
> >
> >
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm

Reply via email to