Skip to content Skip to sidebar Skip to footer

Javascript From Ajax Won't Run

I have a page being ajaxed in, but the document ready code will not run. I'm running in IE7. I get no alert, but 'Page is here' shows fine. The method 'ajax' is a utility method I

Solution 1:

Javascript from an "AJAX" request will not be processed unless you call eval on it - which is not really the best idea

edit this answer is a little too brief - there are ways to native force execution - refer to this more detailed and similar question / answer

How to Force Javascript to Execute within HTML Response to Ajax Request


Solution 2:

Scripts which have no defer attribute won't be executed when inserted via innerHTML (MSDN).


Post a Comment for "Javascript From Ajax Won't Run"