[mapguide-users] Trying to run my first script
Jorge Rubio
j.e.rubio at gmail.com
Wed Apr 11 08:29:56 EDT 2007
Is index.php redirecting parameters to overviewtask.php?
2007/4/11, Krunoslav <a_krunoslav at gmx.net>:
>
>
> Hi all. I'm trying to run my first php script, based on gotopoint.php, but
> so
> far without success. I'm sure someone will see what I'm doing wrong and
> give
> me a hint: I'm trying to set up link from another page, outside of
> Mapguide,
> with something like this:
>
> http://127.0.0.1/mapguide/index.php?X=5000&Y=3000&Scale=500
>
> My right frame (overviewtask.php in example) has code like this:
>
> <html>
>
> <head>
> <title>Welcome</title>
> <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
> <meta http-equiv="content-script-type" content="text/javascript" />
> <meta http-equiv="content-style-type" content="text/css" />
> <link href="styles/globalstyles.css" rel="stylesheet" type="text/css">
> <link href="styles/alphastyles.css" rel="stylesheet" type="text/css">
> <link rel="stylesheet" href="../viewerfiles/viewer.css"
> type="text/css">
>
> <script language="javascript">
>
> function OnPageLoad()
> {
> parent.parent.ZoomToView(<?echo $X;?>,<?echo $Y;?>,<?echo $Scale;?>,
> true);
> }
>
> </script>
>
> </head>
>
>
> <?php
>
> if (isset($_GET['X'])) {
> $X=$_GET['X'];
> $Y=$_GET['Y'];
> $Scale=$_GET['Scale'];
> echo"
> <body onLoad=\"OnPageLoad()\">
> <h1>Zooming...</h1>
> </body>";
> } else {
>
> echo"
> <body class=\"AppFrame\">
> <h1 class=\"AppHeading\">Something</h1>
> </body>";
> }?>
>
> </html>
>
> But, obviously, variables from URL are not passed to the right frame,
> because output produced by this is:
>
> parent.parent.ZoomToView(,,, true);
>
> And, of course, httpd error log about Undefined X,Y,Scale variables.
>
> So, how can I pass the $_GET variable from url to the Task Pane, and
> finally
> to ZoomToView function?
>
> I read examples, but still don't quite understand this...
>
>
> --
> View this message in context:
> http://www.nabble.com/Trying-to-run-my-first-script-tf3558874s16610.html#a9937978
> 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
>
--
Lic. Jorge Rubio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide-users/attachments/20070411/4e640267/attachment-0001.html
More information about the mapguide-users
mailing list