Script not working

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Mal
Reply | Threaded
Open this post in threaded view
|

Script not working

Mal
Mapguide v2.5.2.7949 on Win7/64
In my web layout I have the following script.


myMap=parent.parent.mapFrame;
var X=myMap.GetCenter().X;
var Y=myMap.GetCenter().Y;
var Scale=prompt("Enter Scale:","");
Scale=parselnt(Scale);
myMap.ZoomToView(X,Y,Scale,true);

My script runs, because I am prompted with a dialog box.
I enter the scale followed with a return, but nothing happens. My zoom scale does not change.

what can I do to debug. How can I trace where the issue is.
Reply | Threaded
Open this post in threaded view
|

Re: Script not working

Berg, James
If you're not already, use firebug or IE's developer tools (F10) to view javascript error details
_______________________________________________
mapguide-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

Re: Script not working

GordonL
In reply to this post by Mal
I would try:
replacing
myMap=parent.parent.mapFrame;

with

myMap=parent.parent.whateverthenameofthefameyoucalledit.GetMapFrame();