I have a standard javascript function on a CF page intended to open a popup window:
function openProfileWindow(url) { popupWin = window.open(url, 'detail', 'width=600,height=350,left=1,top=1,scrollbars=yes,resizable=yes');popupWin.window.focus(); } On the CF page I loop through the results of a query and output them. I made one of the values a hyperlink in order to open a popup window to display the potentially lengthy content of another data item. I need to pass a primary key value in the URL so I want it to be encrypted. I use this code: <td class="bioinf"><a href="javascript:openProfileWindow('view_profile.cfm?fi=#JSStringFormat(URLEncodedFormat(Encrypt(key_value,"banana")))#');">#My Link#</a></td> Here is a sample of the resulting value passed to the javascript function: javascript:openProfileWindow('view_profile.cfm?fi=%29%3FG%2F%3CZXG1P%3DWC%0A') I end up with an 'error on page' message in the browser status bar and the popup fails to open. The generated string is the same with or without the JSStringFormat function and the results are the same. If I pass the unencrypted primary key value it works fine. Note: If instead of trying to open the popup I simply open a new CFM using the same logic (minus the JSStringFormat) it works fine: <td class="bioinf"><a href="view_profile2.cfm?fi=#URLEncodedFormat(Encrypt(key_value,"banana"))#;">#My Link#</a></td> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317338 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4