How do I access value of a global variable in a function.
Expand|Select|Wrap|Line Numbers
- var UserName; //declared global
- function1(UName) // this function is called onLoad event and UName is passed
- {
- UserName = UName;
- }
- function2()
- {
- -->//how to get the value of UserName here which is set in above function
- }
I think I am going wrong somewhere....
any help or suggestions plz..
Thanks & regards,