View Full Version : Returning Ajax data performed function?

11-04-2009, 02:39 AM

Client Side : Simple functions that have events tied to different elements. Each time an event is triggered the function begins an Ajax call to an external server side page filled with JS functions.

Server Side : Our client side AJAX call sends the name of the function we want to call out on this file. Once called and performed, it returns DOM edits that could be fired once our client side page receives the data back from Ajax.

I know that data being returned from Ajax is always a string. But would it be possible? I mean could the server side file send out commands or rather DOM edits that the client side could pick up on and perform?

I am almost 100% certain the answer is no due to JS needing to be cached in the browser and what not, but I figured I would ask the experts anyways.

BTW: objective is to move sensitive core JS functions to prevent online application theft... without Flex or Air.

11-04-2009, 06:38 AM
I found out this indeed is possible folks! Via jQuery

$.getScript("url",[call back]);

Now if I could only figure out a way to encode the server response so peeps cant see the script via firebug.