Yeah, the function which uses regex to pull out any script blocks and
eval() them seems pretty straight forward.  I had thought doing that in
CF before I returned the HTML, and then returning the js as a separate
string and evaling it there.  Same difference I guess.

The only thing I am worried about is this sentence:

"However if the JavaScript sent by the server contains functions, these
functions will not be accessible from any others scripts once the eval
function is over."

I wonder if changing

function test() {alert('Hello World!');}

To 

window.test = function(){alert('Hello World!');}

Would work.

~Brad



-----Original Message-----
From: Josh Nathanson [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 07, 2007 6:29 PM
To: CF-Talk
Subject: Re: Dynamic JS

Actually looking at that article again, it doesn't look that tough...you

would just need to add a couple of functions into your ajax scripts and
away 
you go.  There are some limitations but they might not apply to your 
situation.  The other possible "gotcha" would be cross-browser 
compatibility.

-- Josh


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7 
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs 
http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:269099
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to