I have a page which is using AJAX to dynamically populate a div tag with DHTML from a
servlet. The DHTML may contain javascript function definitions (which could be dynamically generated). Currently, the page is loading the HTML and displaying the forms correctly within the 'div' tag - but the buttons which call functions that are part of the dynamically created html retrieved by the AJAX call are not working. An error is thrown "Object expected".
I need some help with this. The way i see it, either
1) I am somehow improperly invoking the dynamic script functions
or
2) I can't invoke script functions returned by an AJAX call and then populated dynamically into a 'div' tag
Hopefully I am doing something wrong here (option 1 above) since it will probably be easy to fix.
Otherwise, I would have to pre-define all the javascript functions i want to use (which is not ideal, but doable).