[mapguide-users] RE: passing parameter from url

kencana kesuma bluesky_dyx at hotmail.com
Fri Dec 8 07:46:43 EST 2006


Hi Farah,

Thanks for the reply and explanation.
what i mean is actually, i want to let user type the postal code parameter,
in the url while they want to open a web (map) layout.
as you can see,
usually, when you open a map web layout you just type the following url:
"http://localhost/mapguide/mapviewerajax/?WEBLAYOUT=Library%3a%2f%2fWeb%2fSG+Trial.WebLayout&LOCALE=en"
which you only pass the weblayout source and the locale parameter.
so, what i mean is, is that possible to add more querystring into the url 
and pass that parameter
into the task pane?like the folowing url
"http://localhost/mapguide/mapviewerajax/?WEBLAYOUT=Library%3a%2f%2fWeb%2fSG+
Trial.WebLayout&LOCALE=en&<b>postal=123456</b>"
i have try by modifying the mainframe.php/jsp but it gave me no luck.
i don't know why it can pass the postal value to the task pane.
I was wondering maybe you know the solution.

Regards,
Kencana


>From: "Farah" <farah at egovernments.org>
>Reply-To: users at mapguide.osgeo.org
>To: "'kencana kesuma'" <bluesky_dyx at hotmail.com>
>CC: <users at mapguide.osgeo.org>
>Subject: [mapguide-users] RE: passing parameter from url
>Date: Fri, 8 Dec 2006 18:12:12 +0530
>
>Hi Kencana,
>
>
>
>Im not sure I understood ur requirement. But suppose u want to pass some
>variables to some jsp/php code that has to be shown /executed in the task
>pane, then the viewer frame has a method like below:
>
>
>
>
>
>
>
>ViewerFrame.formFrame.Submit("../MetData/SearchPage.jsp?SESSION=<%=
>sessionId %>",null ,"taskPaneFrame");  //"taskPaneFrame"
>
>
>
>Help:
>
>
>
>Submit(url, params, target)
>
>Submits a POST request to a server.
>
>Parameters:
>
>url - the URL of the server to send the request to. url can be the name of
>the script, a relative URL, or an absolute URL, depending on where the
>invoked script is located.
>
>
>
>params - an array containing the request's parameters. Specify each
>parameter as a name-value pair of strings, where each pair occupies two
>consecutive array elements. If a request has two parameters, for example,
>params must have four elements: The first element contains the name of the
>first parameter; the second element contains the value of the first
>parameter; the third element contains the name of the second parameter; and
>the fourth element contains the value of the second parameter. If the
>request has no parameters, use an empty array or null.
>
>
>
>target - the case-sensitive name of the request's target frame: "tbFrame"
>(toolbar), "mapFrame" (map area, including the legend and property
>palettes), "formFrame" (this form), "scriptFrame" (script frame), "taskBar"
>(toolbar above the task frame), "taskPaneFrame" (frame containing the task
>pane), or "sbFrame" (status bar). target also can be the window name of an
>existing pop-up frame. The usual targets of a form submit are "scriptFrame"
>and "taskPaneFrame".
>
>
>
>Examples:
>
>The following example calls the script BuildReport.php on the server,
>without parameters, and directs the script's result to the script frame.
>
>formFrame.Submit("BuildReport.php", null, "scriptFrame");
>
>
>
>The following example calls the script Surface.php with two arguments and
>displays the script's result in the task frame.
>
>xmlSel = mapFrame.GetSelectionXML();
>
>params = new Array("UNITS", "SquareFeet", "SEL", xmlSel);
>
>formFrame.Submit("../MiscScripts/Surface.php", params, "taskPaneFrame");
>
>
>
>
>
>Regards
>
>Farah
>
>-----Original Message-----
>From: kencana kesuma [mailto:bluesky_dyx at hotmail.com]
>Sent: Friday, December 08, 2006 8:43 AM
>To: farah at egovernments.org
>Subject: passing parameter from url
>
>
>
>Hi Farah,
>
>
>
>I was wondering, is that possible to pass variable through the url
>
>e.g.
>
>http://localhost/mapguide/mapviewerajax/?WEBLAYOUT=Library%3a%2f%2fWeb%2fSG+
>Trial.WebLayout&LOCALE=en&postal=123456
>
>
>
>what i mean is, i need to pass the postal code variable, so that
>
>i can use it to retrieve x and y coordinate from the database and use it as
>
>the map scale view.
>
>is that possible to make it like that?
>
>Thank you
>
>
>
>Regards,
>
>Kencana
>
>
>
>_________________________________________________________________
>
>FREE pop-up blocking with the new MSN Toolbar - get it now!
>
>http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
>

_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar - get it now! 
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/





More information about the Mapguide-users mailing list