Forum Moderators: open
As for the speed or slowness of the eval() function, I assume that would completely depend on the string size. If you include just a few lines of JavaScript inserted inside short conditioned statements then the returned data size and the corresponding CPU workload when processing the data should be negligable. I assume using eval() in this manner doesn't require any additional server requests, just local CPU processing...
Anyway, if there is any other cross-browser compatible solution than this one (not involving temporary database or file storage) to execute AJAX generated JavaScript I'd very much like to know...