Not directly like in C++ (JavaScript doesn't support references
explisitly).
Plus the script by itself doesn't return any values. Functions in the
script do.
So whatever function does document.write(), you can:
1. Assign "integer" value to a global variable in your xxx.js
var glbInteger = null;
function write2doc (someValue) {
glbInteger = someValue;
document.write(someValue);
}
2. Add a property to any global object
self.document.glbInteger = someValue;
document,write(someValue);
Micha³ J. <mi****@o2.pl> wrote in message
news:Js*******************@news.chello.at...
First script, 'xxx.js' returns value 'document.write('integer');
So in HTML:
<script language='javascript' src='xxx.js'></script>
will write ie. 123 on my page in browser.
Can I get this integer or text 'document.write('integer')' to variable
in another script? So it would be something like this:
<script landuage='javascript>
a=<script ... src='xxx.js'></script>;
a*=20;
document.write(a);
</script>
Please help me.
--
Mike J.
mi****@o2.pl