capture external js filename

J

jshanman

Hi,

I am trying to capture the filename of an external script (which I do
not have access to change). The external script has document.write,
which I have overridden with my own function dw. This external script
can be from many sources and the context of the document.write is
sometimes global and sometimes within named/anonymous functions.

From within dw, I want to figure out in which external script (by url)
that the original document.write was called. I am able to do this in
all major browsers except IE and safari by using the stack trace
methods and regex parsing.

Is this possible to accomplish in IE (7+) and Safari?

Here is my test page:
http://equipment.forconstructionpros.com/lib/test.php (view source)
which include the very simple external js file:
http://equipment.forconstructionpros.com/lib/test.js

Thanks,
- Justin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top