Jump to content

Evaluating JavaScript Received From Ajax Request


tmh766

Recommended Posts

Hi everyone.

 

I have never done anything like this and can't seem to figure out a solution.

 

I have a page with a div whose content is reassigned onclick by way of an Ajax request. Here is the part I can't figure out. The div's content (a bunch of text comments and a reply box) uses JavaScript to move the reply box up and down to each comment when clicked, and more importantly, to set an ID variable, in the form (which contains the comments and reply box) so when posted, the server knows which comment is being replied to.

 

Does anyone have an idea on how I can get the JavaScript within the returned text from the Ajax request to be evaluated? I can't seem to figure out a way. The Ajax request and is completed successfully, the returned HTML snippet is evaluated and rendered, but not the JavaScript that accompanies it.

 

Thanks a lot for your time, I would greatly appreciate any insight on this problem,

Tim

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.