passing parameter from url

Farah farah at egovernments.org
Fri Dec 8 07:42:12 EST 2006


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/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide-users/attachments/20061208/a4821579/attachment.html


More information about the Mapguide-users mailing list