S
Sister Ray
I've searched for a way to this in a lot of forums. Haven't found a
solution for this, however I've found a work around.
Declaring a public object and then adding the variables i want as
members of thta object, like this
<script>
function myobject(){}
var a = new myobject();
function foo()
{
a.var1 = "some string";
}
function foo2()
{
//a.var1 exists in foo2
alert(a.var1);
}
//and outside the function
alert(a.var1);
this spends a litle more memory but does what i wanted. apart from
obvious "why would i want to this", does anybody have a better
solution for this?
Best Regards.
solution for this, however I've found a work around.
Declaring a public object and then adding the variables i want as
members of thta object, like this
<script>
function myobject(){}
var a = new myobject();
function foo()
{
a.var1 = "some string";
}
function foo2()
{
//a.var1 exists in foo2
alert(a.var1);
}
//and outside the function
alert(a.var1);
this spends a litle more memory but does what i wanted. apart from
obvious "why would i want to this", does anybody have a better
solution for this?
Best Regards.