shane18 Posted February 11, 2010 Share Posted February 11, 2010 I need to use data from a Array called WR... in a function used in the Ajax onreadystatechange.... In PHP I know you do.. gobal $WR; whats the way for javascript? Quote Link to comment Share on other sites More sharing options...
RussellReal Posted February 11, 2010 Share Posted February 11, 2010 just use it.. in Javascript there are only 2 scopes.. function variables and global variables, anything specified outside of a function will be available inside of a function.. everything specified inside of a function will be destroyed after the function exits. Quote Link to comment Share on other sites More sharing options...
shane18 Posted February 11, 2010 Author Share Posted February 11, 2010 yea i figured out why it wouldn't work, thanks for that info though Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.