Function: RenderCanyonSchnellzugriff

Parameters

Implementation

%STARTINCLUDE%
<form name="switchToCanyonForm" action="%SCRIPTURLPATH{view}%/Canyons/" method="get">
<select name="topic" size="1" onchange="document.switchToCanyonForm.submit()"/><option value="">%MAKETEXT{"Select canyon ..."}%</option>
<script type="text/javascript">

var req = new XMLHttpRequest();
req.open('GET', 'https://canyon.carto.net/cwiki/bin/custom/cmap.pl?f=json&outFields=WikiName,Flussname,Aliasname,Schluchtname&table=canyons', false); 
req.send(null);

var obj = eval ("(" + req.responseText + ")"); 

var canyonList=[];

for (var i=0;i<obj.features.length;i++)
{   
   var name=obj.features[i].properties.Flussname;
   if (obj.features[i].properties.Aliasname != '') {name=obj.features[i].properties.Aliasname;}
   if (obj.features[i].properties.Schluchtname != '') {name=obj.features[i].properties.Schluchtname;}
   var canyon= {
      canyonname: name,
      wikiname: obj.features[i].properties.WikiName
   }
   canyonList.push(canyon);
}

function compare(a,b) {
  if (a.canyonname < b.canyonname)
     return -1;
  if (a.canyonname > b.canyonname)
    return 1;
  return 0;
}

canyonList.sort(compare);

for (var i=0;i<canyonList.length;i++)
{
   document.write('<option value='+canyonList[i].wikiname+'Canyon>'+canyonList[i].canyonname+'</option>');
}

</script>
</select>
</form>
%STOPINCLUDE%

Test

Alle Canyons aus

Canyon Schnellzugriff:

Fotogalerie(n) vorhanden -
Topo des Canyons vorhanden - Globe
Blog(s) zum Canyon vorhanden - Note
Koordinaten für den Einstieg fehlen - Meet here
Canyonbeschreibung unvollständig - Question

Canyon Bundesland Region Bew. Aic Abs. subjektiv Hdiff. Abseiler Zeit gesamt Hinweise

0 Canyon(s)

-- PeterSykora - 01 Aug 2008

-- PeterSykora - 01 Aug 2008

Topic revision: r5 - 2013-12-06 - PeterSykora