[mapguide-users] Problem with ZoomToView during onload event

Andy Morsell amorsell at spatialgis.com
Tue May 29 14:23:47 EDT 2007


It does sound like the mapFrame where ZoomToView resides does not exist yet
when the onload event from the other frame is calling it.  It may help to
have onload call in intermediate function in that frame.  That function
would use a JavaScript setTimeout method or similar to test for the
existance of the other page.  Once it exists, then go ahead and let your
ZoomToView execute.


Andy

-----Original Message-----
From: mapguide-users-bounces at lists.osgeo.org
[mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Jon Rizzo
Sent: Tuesday, May 29, 2007 10:29 AM
To: mapguide-users at lists.osgeo.org
Subject: [mapguide-users] Problem with ZoomToView during onload event



I am having a strange problem - I am trying to call the ZoomToView function
in the onload event of my page.  The problem seems to be that sometimes the
ZoomToView function works and sometimes it doesn't.  If I bring up a brand
new browser session and type in the URL to my page, it usually works fine
the first time.  If I hit the Reload button, the ZoomToView function doesn't
ever seem to execute (although sometimes it does).  I was reading an earlier
thread which suggested calling the onload event in the top level frame
(which I have done) but the results are still very inconsistent.  Any ideas
about what is going on here?

Jon

--
View this message in context:
http://www.nabble.com/Problem-with-ZoomToView-during-onload-event-tf3835370s
16610.html#a10858737
Sent from the MapGuide Users mailing list archive at Nabble.com.

_______________________________________________
mapguide-users mailing list
mapguide-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users




More information about the mapguide-users mailing list