[RESOLVED] Need help understanding object scope
If I take the code from tempLoad and put it in
MapObj=new Object ();
MapObj.map; //This what I have problems with latter on
//VARIOUS METHODS //...
//All the stuff in here works
function initMap (strContainerID, numLatitude, numLongitude)
MapObj.map = new FromVendorLib.Map(strContainerID);
//So now I assume MapObj.map holds what I need, but
//Now I crash at MapObj.map.
// All kinds of other stuff
var SomeVar = new AnotherVendorThing.Thing(MapObj.map,
someParameter : 40
initMap everything is fine. However I really want to keep my
initialization and loading separate. So I assume I am missing
a fundamental concept with scope and objects. Please educate me.
The code you posted looks fine, which means your real problem is somewhere in the code you haven't shown us. The best thing you can do to get your question answered is to link to the actual page that's having the issue.
That was it!
Thanks for the kick, you helped me answer my question. With your re-assurance, what I did not mention is that I am working with multiple frames. The Init button was in the same frame, the Load button was not. When I move the load button to the same frame it works. Whole day shot for nothing! Anyway this will require research on HTML frames if I want to move it back. THANK YOU FOR ANSWERING!
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)