I'm using GeoExt.Popup to create a popup when a user click on an WFS (point) on the map. When the user click on a point on the map I want to send the GID (primary key from DB) to a servlet or JSP to send back HTML with all information about that point (using iframe inside the GeoExt Popup).
I don't know how to get the GID value for the point that user clicked. Any one knows how to get an attribute from the map?
I'm using this code:
if (popup) {
popup.destroy();
popup = new GeoExt.Popup({
title: "Info:",
width: 600,
height: 350,
margin: 1,
autoScroll: true,
maximizable: true,
collapsible: true,
map: map,
location: map.getLonLatFromPixel(e.xy),
//html: e.text
html: "<iframe src='response.jsp?codVertices=1' width='100%' height='100' frameborder='0'></iframe>"});
popup.show();
In the "HTML" option I want to get the GID and send it to the servlet or JSP. It's working fine when I manually insert the GID in the html code...
Thank you very much. Pedro