Il 08:33, gioved? 6 aprile 2006, alessandro.bezzi at arc-team.com ha scritto:
> Hi all,
> i'm usin pmapper 1.9.5.
> i would link the result query (selected fields) of my postgis table to
> another page. i see it is possible in the gallery of pmapper
> (http://www.terneuzen.nl/pmapper/pmapper/start.phtml).
> I set the mapfile with the line "RESULT_HYPERLINK" "FIELD1||Link on Detail,
> FIELD2" but i don't know how to work in the custom.js file. Is there an
> exemple i could see to understand the code?


Try something like this:



function openHyperlink(layer, fldName, fldValue) {
    switch(layer) {
        case 'suoli':
            window.open('../../html/ipertesto/fasi/' + fldValue + '.htm');
        break;
        default:
            alert ('Nessuna informazione disponibile per ' + layer + ' - ' + 
fldName + ' - ' + fldValue);
        break;
    }
}


This open a window on a plain HTML page taking the name of the page from the 
value of the field in the layer 'suoli'.

For other layers other than suoli an alert box is opened.

Hope it helps.

Cheers.
-- 
Alessandro Pasotti
w3   www.itopen.it
Linux User #167502


Reply via email to