[Geomoose-users] Popups in Geomoose?
Knippel, Randy
Randy.Knippel at CO.DAKOTA.MN.US
Fri Nov 2 22:29:39 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.
________________________________
From: Fischer, Brian [mailto:bfischer at houstonengineeringinc.com]
Sent: Fri 11/2/2007 11:15 AM
To: Knippel, Randy; Dan Little (E-mail)
Cc: geomoose-users at lists.sourceforge.net
Subject: RE: Popups in Geomoose?
Randy,
Can you post your questions to the geomoose-users mailing list
(http://www.geomoose.org/moose/community-support/geomoose-mailing-list/)
? That way if someone else has the same question they can search the
archives.
You should be able to add an attribute to your service called
"display=window". This worked in a previous version. Hopefully it still
does.
More info at:
http://www.geomoose.org/moose/documentation/configuration-guides/xml-map
book-configuration#service
-Brian
-----Original Message-----
From: Knippel, Randy [mailto:Randy.Knippel at CO.DAKOTA.MN.US]
Sent: Friday, November 02, 2007 10:28 AM
To: Fischer, Brian; Dan Little (E-mail)
Subject: Popups in Geomoose?
I want to hyperlink to a document through an identify tool. I want the
document to come up in a popup when the user clicks on the hyperlink in
the attribute display. Is this built in? Is there a generic javascript
function I can call? I tried using the attached html template including
in-line Javascript to do a window.open. It works, but the original
Geomoose application window changes to something else with "[object
Window]" in it.
Help?
<<identify_parks.html>>
-Randy
Randy Knippel
GIS Manager
Dakota County Office of GIS
Western Service Center
14955 Galaxie Ave.
Apple Valley, MN 55124
randy.knippel at co.dakota.mn.us
phone: 952-891-7080
fax: 952-891-7097
More information about the Geomoose-users
mailing list