I need some help with this. The way i see it, either
1) I am somehow improperly invoking the dynamic script functions
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.
Originally posted by Bear Bibeault: Life is too short to do all that low-level coding myself.
Well you are too busy yelling at people here to roll you own.
Joined: Apr 10, 2007
For example if I were loading the following innerHTML into the div tag:
It would properly output 'Hello World' like I'd expect. This is all well and good.
However... - - - - - - - - - - - - - - - - - - - Here is the innerHTML loaded by AJAX... This displays the button 'Hello World', but when you click the button it still gives me the 'Object expected' error!
NOTE: This is an example. I could have put 'alert("Hello World")' in the onclick for the button. But i really need to make a call to a function inside the HTML loaded by the AJAX request.
Any Ideas?? My guess here is that maybe there is another helpful utility function in Prototype (or some other suite) - or possibly i'm not using the method you suggested properly?
Here is the method which is invoked when the AJAX request onreadystatechange:
FYI: I REALLY appreciate all of your prompt and helpful responses! So far this has been a great help! [ April 25, 2007: Message edited by: Scott McGhee ]