[thelist] Java Script and variables

Kerin Cosford Kerin.Cosford at current-drugs.com
Wed Jun 13 09:52:08 CDT 2001


er....

declare the variable outside of a function?

-----Original Message-----
From: Oliver Lockwood [mailto:isdarksaber at hotmail.com]
Sent: 13 June 2001 15:36
To: thelist at lists.evolt.org
Subject: [thelist] Java Script and variables




Is there a way for the same vaiable to be defined inside and outside a 
function?

ie

function getNum
{
    whatever = num1;
    alert(num1);
}

alert(num1)

----

num 1 outside the function would be the same as inside the function... I 
know this doesn't work, it just says that num1 is undefined, but is there 
any alternative method for this to work?
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


---------------------------------------
For unsubscribe and other options, including
the Tip Harvester and archive of TheList go to:
http://lists.evolt.org Workers of the Web, evolt ! 




More information about the thelist mailing list