I've read up on the subject, but my application is showing that
my understanding has gaps.
If I have an ajax function that in the returned "response" exists
a value called "response.STORY_ID" and I used the statement in the
success section of the ajax function, gNewStoryID = response.STORY_ID,
and then alert(gNewStoryID), I do get the property ID returned in the alert.
Now I want to use that variable, gNewStoryID, in other functions. My
understanding
was that, by using gNewStoryID = response.STORY_ID, I was creating a global
variable
that could then be used in any function.
However, when I try to use the gNewStoryID in another function, for
instance,
$('#newStoryIDSpan').empty().append(gNewStoryID);
I get an error stating "gNewstoryID is not defined".
Where is my understanding in complete? I was think that a global javascript
variable
would be available through the application as is a ColdFusion session
variable.
Thanks for helping me understand!
Rick
----------------------------------------------------------------------------
-----------------------------------------------------------
"It has been my experience that most bad government is the result of too
much government." - Thomas Jefferson