I would like to save the value of a local variable to be used later on in my code. What is the best way to do this?
The code you posted is hard to read and full of Legacy style coding. Can you create a JS-Bin or JS Fiddle with your complete code that way I can help fix your Legacy use situations as well?
Create a new fiddle - JSFiddle
Retrieving data ...