...

View Full Version : AJAX returning javascript problem



ellisd5
12-05-2006, 06:18 PM
I have some AJAX code which basically updates a section of the screen with new content.

This new content contains some javascript in it. The javascript which is return by the ajax request does not work. So my question, is there a way to dynamicly refresh the event handlers or something else maybe to get the javascript returned to work. Not show how javascript works in terms of is it loaded into memoty or soemthing at the start of a page load, but is there a way to like reload the code so my my new Javascript will be picked up?

I know I could just have the javascript in the page that does the calling but there are 100's of screens it could call and therefore its not practical to do it this way.

TIA
Dale

A1ien51
12-05-2006, 06:57 PM
Dale:

See this:

http://www.ajaxforums.net/viewtopic.php?t=177

LOL, and you kicked me off your forums for doing the same thing...

Oh my!

Eric

A1ien51
12-05-2006, 07:01 PM
I have some AJAX code which basically updates a section of the screen with new content.

This new content contains some javascript in it. The javascript which is return by the ajax request does not work. So my question, is there a way to dynamicly refresh the event handlers or something else maybe to get the javascript returned to work. Not show how javascript works in terms of is it loaded into memoty or soemthing at the start of a page load, but is there a way to like reload the code so my my new Javascript will be picked up?

I know I could just have the javascript in the page that does the calling but there are 100's of screens it could call and therefore its not practical to do it this way.

TIA
Dale

You need to have the JavaScript evaled. I would look at libraries such as prototype.js or dojo which has it built in.

Eric

ellisd5
12-06-2006, 12:01 PM
OK thanks the link has answered my question.

Thanks
Dale



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum