Help with variable scope?
Date: 09/07/10
(Javascript Community) Keywords: html
I have a variable that I want to retain its value between function calls. The page is here: http://zyada-stuff.com/SpreadingRoots/temp.html
The function is an event listener, and the variable is map_marker0. If I could get the variable to retain its value between calls, line #45 would erase the marker so that it could be reset to a new spot. Right now, the page just creates a new marker.
Source: http://javascript.livejournal.com/171939.html