Forum Moderators: open
I'm hoping to hear from some experienced AJAX experts out there the best way to handle situations where you are making an AJAX call to a page that contains HTML and Javascript. I am using jQuery and I know jQuery automatically runs eval on the javascript.
It all works fine and I have been using it. But I hear alot that using eval() is bad. I also know that I could set up the javascript in the page that is making the AJAX call (if I know what the javascript is ahead of time). I guess I really want to know what the best way is to hanlde these AJAX situations where you are not only receiving HTML but also getting some javascript?
Thanks!
However, if you are running eval on data from a server outside your control, you should have a *high* degree of trust with that source.