>>You are suggesting that it will always work if I call URLEncodedFormat *FIRST* and then JSStringFormat SECOND - as in the sample above?
Again, it depends what you call "first" or "before" and "second" or "after". In the line: JSStringFormat(URLEncodedFormat(encrypt("UDVBIE","(my key)"))) JSStringFormat appears first in the line, but encrypt will be called first, THEN URLEncodedFormat, and LAST JSStringFormat, by ColdFusion. And finally, on client side, the result of all this will be passed to the Javascript function didetail(); It is THIS function which needs to receive a JS string, so you call JSStringFormat() to encode the string passed to it. THEN, JS will possibly pass the string as an URL string, so that string must have been URLEncodedFormat() before, and since you wanted the string to be encrypted, you had to call the encrypt() function first. Furthermore, in the reverse order, JS decodes the JSStringFormat, then passes it as an URL string, then the HTTP server will de-URLEncode it and pass it to the CF template, THEN finally, the CF template will decrypt it back. If it works the reverse way, then good for you, but some day, some time,... smile ! ;-) >>I always test my code before posting solution to mailing lists, Alas, this is not enough to be sure it will ALWAYS work. ;-) If your encoded string has no quote, no URL uncompatible character, both functions JSStringFormat and URLEncodedFormat will just do nothing, so of course their order is irrelevant. -- _______________________________________ REUSE CODE! Use custom tags; See http://www.contentbox.com/claude/customtags/tagstore.cfm (Please send any spam to this address: [EMAIL PROTECTED]) Thanks. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:229943 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54