![]() |
Available news archives:
comp.lang.tcl
-
comp.lang.python
-
comp.security.firewalls
-
sci.crypt -
comp.lang.php -
comp.lang.javascript
|
|
comp.lang.javascript archiveRe: calling functions from cgi
From: Randy Webb <HikksNotAtHome@aol.com>
Date: Tue Jan 31 2006 - 00:49:43 CET
Tony Rice said the following on 1/30/2006 6:11 PM:
Drop the language attribute though.
> Shouldn't I be able to call a function from inside foo.js later in that
Yes, that is exactly how you would do it, but drop the language attribute.
> Even though it's generated from a CGI script?
The script engine in the browser doesn't know, nor does it care, what
> The all loaded javascript files have the same scope do they not?
They have the same scope as if you manually included them in the page,
<script type="text/javascript" src="myJSFile.js"></script>
And if myJSFile.js had a function in it like this:
function myFunction(){
That function will have the same "scope" as if you did this:
<script type="text/javascript">
> It's not like the functions in foo.js available only to other
Correct.
-- Randy comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/Received on Tue Feb 7 21:28:10 2006 |