On Sun, 28 Nov 2004 21:41:39 +0100, kinne <ki***@advalvas.be> wrote:
[snip]
I need to call an external ".js" file and pass a parameter to it.
You cannot "call" a file; it's just plain text.
A SCRIPT element with a src attribute is effectively the same as a SCRIPT
element with the file contents included directly in it. Any script added
to a document shares the same global namespace, so the code in the second
SCRIPT element below can access the variables defined and initialised in
the first, irrespective of whether the code is stored in an external file
or included directly in the document.
<script type="text/javascript">
var someGlobal = 'A variable';
</script>
<script type="text/javascript">
alert(someGlobal); // 'A variable'
</script>
In summary, you don't need to "pass" anything.
[snip]
Mike
--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.