[Mapserver-users] How to view the query results in a separate frame.

Eduardo Spremolla edspremolla at Antel.com.uy
Wed Oct 22 05:44:52 PDT 2003


El mié, 22 de 10 de 2003 a las 03:53, Michael Schulz escribió:
> Hi Maria,
> 
> i don't have a short snipplet that does it, it is all incorporated in 
> more javascript functionality, but a simple way to do it could be:
> 
> - catch the submission of your main mapserver form with:
> 
> <form name="mapserverform" ... onSubmit="chooseTarget();">
> 
> - check in chooseTarget() if mapserver mode is query, then we want to 
> redirect the result:
> 
> function chooseTarget() {
> if (document.mapserverform.mode.value=="query")
>    document.mapserverform.target="queryFrame";
> document.mapserverform.submit();
> }
> 

Please, don't do that, user getElementById("mapserverform_mode").value,
assuming "mapserform_mode" is the id of the mode field,
so you be DOM compliant and work on every browser.
 


> When you've selected query mode and you query the map then your frame 
> named "queryFrame" will get the result. You should adjust your templates 
> accordingly. Keep in mind, that this procedure doesn't change your main 
> mapserver frame. You won't get a hilited query map with this simple 
> redirection.
> 
> HTH, Michael
> 
> 
> m soto . wrote:
> > hi michael!
> > 
> > i read the answer you made to guillaume. i was wondering if you know any 
> > example in www to see that, or if you have got de javascript function to 
> > do that.
> > 
> > i'm trying to redirect the result of the query to another frame, but i 
> > can't.
> > 
> > thanks.
> > 
> > Adeu. Maria.
> > 
> > ----- Mensaje Original -----
> > Remitente: Michael Schulz mschulz at webgis.de
> > Destinatario: Guillaume MOCCAND moccand at ensg.ign.fr
> > Fecha: Martes, Octubre 21, 2003 11:25am
> > Asunto: Re: [Mapserver-users] How to view the query results in a 
> > separate frame.
> > 
> >>Hi,
> >>
> >>i am not sure if a howto exists on this topic.
> >>
> >>One way is to use javascript in the query-template, that writes the  
> >>attribute results to your other frame when the page is loading (with  
> >>onLoad() funtion in the body-tag).
> >>
> >>Another way is to redirect the result of the query to the other  
> >>frame.  
> >>Change the target (also via javascript) of your main mapserver form  
> >>to  
> >>your result frame for queries only. But then you don't have the  
> >>hilited  
> >>map in your main frame.
> >>
> >>Cheers, Michael
> >>
> >>
> >>Guillaume MOCCAND wrote:
> >>>  Hi List !
> >>>   
> >>>  i wonder how i could see the result of an identify query in a  
> >>diffrent frame  
> >>>  from the map frame ... i want to still see the map while the data  
> >>are displayed.
> >>>  does anyone have a "howto" on this tips ?
> >>>   
> >>>  thanks
> >>>   
> >>>  Guillaume MOCCAND
> >>>  moccand at ensg.ign.fr
> >>>  _______________________________________________
> >>>  Mapserver-users mailing list
> >>>  Mapserver-users at lists.gis.umn.edu
> >>>  http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
> >>>   
> >>
> >>
> >>--  
> >>-----------------------------------------------------------
> >>Michael Schulz                                in medias res
> >>Dipl.-Geologe                              Gesellschaft für
> >>                                 Informationstechnologie mbH
> >>                                      In den Weihermatten 66
> >>                                       79108 Freiburg
> >>                                      0761 55695-95 (Fax 96)
> >>mschulz at webgis.de              www.webgis.de/www.zopecms.de
> >>
> >>_______________________________________________
> >>Mapserver-users mailing list
> >>Mapserver-users at lists.gis.umn.edu
> >>http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
> >>
> > 
-- 
Eduardo Spremolla <edspremolla at antel.com.uy>
Antel I+D




More information about the MapServer-users mailing list