[JS, CS2] Is there a variable containing the name of the calling script?
Hi,
I need to have a script be able to know its own name.
This is because I have a situation where I have a find/change routine for cleaning up and styling text that I need to run on a few different kinds of stories (I work for a newspaper and they're along the lines of "default body copy," oped page," "arts section," etc.), but the vast bulk of the find/change routine is the same for all of them. My co-workers have to be able to have each of the routines be in different scripts to they can click on them. So I want each specialized script to have nothing in it but one #include statement which will #include the text of one main script. That way whenever I make changes to it, I don't have to save it as a million slightly different versions.
So if I need to be able to determine the name (or path) of the script that has been called, so the script can then perform the few specialized actions needed for that story type. Is there a way to do that?
This would be something like the php variable $argv[0].
Thanks.
