[Mapbender-users] PHP-Code in getFeatureinfo-Template

Kai Behncke Kai-Behncke at gmx.de
Mon Jan 5 08:24:18 EST 2009


Dear list, 
I`ve got a generell question to the (mapbender)-html-getFeatureinfo-Template.

If the template after a getFeatureinfo-Mouseclick pops out obviously no php-Code is parsed.

I tried it on the server-side with
"AddType application/x-httpd-php .htm .html" but also this did not work.

I wonder which possibilites exist to start php-Code after requesting the template?
So far I did it via ajax in the template with:

<body onload=javascript:php_aktivieren()>

<span id="inhalt"></span>
</body>

...and the function is:

"var resObjekt;
if (navigator.appName.search("Microsoft") > -1) {

//resObjekt = new ActiveXObject("Microsoft.XMLHTTP");
resObjekt = new ActiveXObject("MSXML2.XMLHTTP");
}
else {
resObjekt= new XMLHttpRequest();}

function php_aktivieren(){

resObjekt.open('get','http://localhost/gastronomap/index.php?id_datei_01=1&id_datei_02=&kategorie=grunddaten&objekt_id=[objekt_id]&gendre=[gendre]',true);
resObjekt.onreadystatechange = handleResponse;
resObjekt.send(null);
}

function handleResponse(){

if (resObjekt.readyState == 4){

document.getElementById("hs").innerHTML= resObjekt.responseText;
}

}"

......but it seems a bit to circumstantial.

Does anybody has another solution how to integrate php-Code after a getFeatureinfo??

Thank you very much, Kai
-- 
Sensationsangebot verlängert: GMX FreeDSL - Telefonanschluss + DSL 
für nur 16,37 Euro/mtl.!* http://dsl.gmx.de/?ac=OM.AD.PD003K1308T4569a


More information about the Mapbender_users mailing list