Passing parameters from the task pane frame is similar to passing them from an Invoke Script command. Use the Viewer API to retrieve values and call the Submit method of the formFrame to pass the values to another page.
For example, the following function passes the map view scale and the center point as parameters to a page that opens in a new window.
function submitRequest(pageUrl) { xmlSel = parent.parent.mapFrame.GetSelectionXML(); mapScale = parent.parent.mapFrame.GetScale(); mapCenter = parent.parent.mapFrame.GetCenter(); params = new Array( "SESSION", parent.parent.mapFrame.GetSessionId(), "MAPNAME", parent.parent.mapFrame.GetMapName(), "SELECTION", xmlSel, "SCALE", mapScale, "CENTERX", mapCenter.X, "CENTERY", mapCenter.Y ); parent.parent.formFrame.Submit(pageUrl, params, "_blank"); }
To call the function, execute it as part of an onClick event or as the action in a form. For example, clicking the following link would execute the function:
<a href="#"
onClick="submitRequest(
'/mapguide/devguide/custom_output/property_report.php');
return false;">
Click for report</a>