Urgent help needed regarding executing Scripts in AJAX response. If possible, please post the code snippet also as soon as possible.

Thanks in advance.

you have to be a little more specific. what exact do you need to do with it.

I am looking for the same solution.
The details are I am fetching a file via ajax, much as you would an iframe. The file opens in an 'ajaxwin' window layer above the parent dhtml document (floating div essentially).

The problem is that if your external page contains a JavaScript that dynamically outputs something on runtime in that page, for example:

document.write("My name is John")

That output will not shown up when it's included on the main page via Ajax, as this is a runtime operation, which Ajax isn't (it's asynchronous or dynamic).

Here is a link to a fuller description of the issue:
Populating DHTML Widget window.

This will be interesting if someone knows what to do with this ;^)

The problem is that different information exists on different computers.

When JS writes something dynamic, the client computer knows this, but the server computer can't see it.

Meanwhile, the server computer can see only the original version of the page, so that is what it uses.

You need ONE server-side program handling all of the operations.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.