libreenfete-squelettes/modeles/agenda_rss.html

35 lines
1.1 KiB
HTML
Raw Permalink Normal View History

2017-01-09 10:47:45 +01:00
<p style="margin-left: 20%">
<select id="rss-link-select" onchange="change_rss_link()">
<option value="0">Toutes les régions</option>
<BOUCLE_region(DATA){source tableau,#LISTE_REGIONS}>
<option value="#CLE">#VALEUR</option>
</BOUCLE_region>
</select>
<a href="http://www.agendadulibre.org/events.rss?tag=#ENV{tag}&daylimit=120" id="rss-link">Flux RSS de tous les évènements</a>
</p>
<script language="javascript">
function change_rss_link()
{
select = document.getElementById('rss-link-select');
selection = select.value;
link = document.getElementById('rss-link');
if (selection == 0) {
link.innerHTML = "Flux RSS de tous les évènements";
link.href = "http://www.agendadulibre.org/events.rss?tag=#ENV{tag}&daylimit=120";
} else {
link.innerHTML = "Flux RSS des évènements de la région " + select.options[select.selectedIndex].text;
2018-02-01 22:54:16 +01:00
link.href = "http://www.agendadulibre.org/events.rss?region=" + selection + "&tag=#ENV{tag}&daylimit=120";
2017-01-09 10:47:45 +01:00
}
}
</script>