469,610 Members | 2,092 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,610 developers. It's quick & easy.

External Script Files

Is there anyway to pass a value to the external file?

example

<script src="http://www.thesite/js/today.js?something=1">
</script>
Jul 20 '05 #1
1 1822
Lee
Smoke said:

Is there anyway to pass a value to the external file?

example

<script src="http://www.thesite/js/today.js?something=1">
</script>


<script type="text/javascript">
something=1;
</script>
<script src="http://www.thesite/js/today.js">
</script>

The "external" file doesn't do any processing externally.
The code is loaded into the current page, and executed
there, so any global variable in the current page is
available to it.

Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Erohsik | last post: by
2 posts views Thread by KS | last post: by
9 posts views Thread by Charley Kyd | last post: by
10 posts views Thread by Pasquale | last post: by
1 post views Thread by mb | last post: by
20 posts views Thread by Mark Anderson | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.