Il mercoledì 12 settembre 2007, Laura Poggio ha scritto:
> Thank you very much for the information. This helps me a lot!
> On the list archive I found the following two functions:
>
> function openHyperlink(layerName, fldName, fldValue) {
> window.open('/redirector.php?layer_name=' + layerName + '&field_name='
> +
> fldName + '&field_value=' + fldValue, 'query_results');
> }
>
> I think that with that I can manage to implement what I need, even if my
> knowledge of js is quite around zero.
> Just a question about the second function: instead of redirector.php is it
> possible to use any php script?
Yes, of course, I just found much more easy to maintain the application logic
on the server instead of in javascript file.
This function, calls a simple php script that given layer_name, field_name and
field_value decide where to redirect the browser, this way you can calculate
complex url on the server and easily manage missing/protected images or
display a nice error page instead of a 404 if something goes wrong.
If you choose this approach, the advantage is that you will never need to
change openHyperlink function if you decide to add a new layer.
--
Alessandro Pasotti
itOpen - "Open Solutions for the Net Age"
w3: www.itopen.it
Linux User# 167502
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
pmapper-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pmapper-users