scope problem
I am working on the trivia quiz code in chapter 6. The downloaded code works fine. When I load and execute my copy of the code, I get an error message. The problem occurs when the code moves to the getQuestion function. I get a message telling me that qustions array is either null or not an object. When I step through the debugger I can see that the questions array has been populated before it moves to the getQuestion function. The questions array appears to lose scope in the getQuestion function. I have compared my copy of the code to the downloaded version and they match line for line. I am using MS FrontPage as my editor. Any ideas on what might be going on?
Thanks in advance.
|