[Geomoose-users] Popups in Geomoose?

Knippel, Randy Randy.Knippel at CO.DAKOTA.MN.US
Sat Nov 3 09:23:33 EDT 2007


Create hyperlink popups in query results by including a bit of JavaScript in the href tag to open a new window.
 
In the HTML record template use:
<a href="javascript:void window.open('[HYPERLINK]','Popup','scrollbars,resizable,width=500,height=380');">Click Here</a>
where [HYPERLINK] is a field in the data being queried, the value of which is the URL to a web document (HTML, pdf, etc.).  Note that any part of the path could be hard coded before or after [HYPERLINK] in the record template as well.
 
Note that returning query results as HTML has other caveats:
In the map library file (XML) use the keyword 
  <input type="hidden" name="output" value="html"/>
In the map file used by MapServer to do the actual query, use 
 WEB
        QUERYFORMAT 'text/html'
 END
 and
 HEADER 'header_template.html'
 FOOTER 'footer_template.html'
 TEMPLATE 'record_template.html'
to define the HTML format for the returned attributes.

     -Randy




More information about the Geomoose-users mailing list