Accéder au contenu.
Menu Sympa

devel - [Devel] r196 - trunk

Objet : devel-adl

Archives de la liste

[Devel] r196 - trunk


Chronologique Discussions 
  • From: svn AT agendadulibre.org
  • To: devel AT agendadulibre.org
  • Subject: [Devel] r196 - trunk
  • Date: Thu, 2 Nov 2006 19:26:14 +0100 (CET)
  • List-archive: <http://lolut.utbm.info/pipermail/devel>
  • List-id: Developpement de l'Agenda du Libre <devel.agendadulibre.org>

Author: thomas
Date: Thu Nov 2 19:26:13 2006
New Revision: 196

Modified:
trunk/funcs.inc.php

Log:
Utilisation de l'évènement "onchange" de <select>, plutôt que
l'évènement "onclick" des <option>. D'une part, le code est plus
court, et surtout, ça fonctionne sous Konqueror et Internet Explorer.



Modified: trunk/funcs.inc.php
==============================================================================
--- trunk/funcs.inc.php (original)
+++ trunk/funcs.inc.php Thu Nov 2 19:26:13 2006
@@ -372,7 +372,8 @@
echo " <a
href=\"?year=".$next_year."&amp;month=".$next_month."&amp;region=".$region."\">
&gt;&gt; </a>\n";

echo "<form>\n";
- echo "<select>\n";
+ echo "<select onchange=\"window.location='?year=" . $year . "&amp;month=" .
+ $month . "&amp;region=' + this.options[this.selectedIndex].value\">\n";

$ret = $db->query ("select * from regions");
if ($ret == FALSE)
@@ -382,24 +383,16 @@
exit;
}

- echo "<option onclick=\"window.location='?year=" . $year .
- "&amp;month=" . $month . "'\"" .
- "value=\"all\">Toutes les r�gions</option>\n";
+ echo "<option value=\"all\">Toutes les r�gions</option>\n";

while ($row = mysql_fetch_object($ret))
{
if ($row->id == $region)
echo
- "<option onclick=\"window.location='?year=" . $year .
- "&amp;month=" . $month .
- "&amp;region=" . $row->id .
"'\"" .
- "value=\"" . $row->id . "\" selected=\"1\">" . $row->name
. "</option>\n";
+ "<option value=\"" . $row->id . "\" selected=\"1\">" . $row->name .
"</option>\n";
else
echo
- "<option onclick=\"window.location='?year=" . $year .
- "&amp;month=" . $month .
- "&amp;region=" . $row->id .
"'\"" .
- "value=\"" . $row->id . "\">" . $row->name . "</option>\n";
+ "<option value=\"" . $row->id . "\">" . $row->name . "</option>\n";
}

echo "</select>";
@@ -432,7 +425,9 @@
echo " <a href=\"?year=".$next_year."&amp;region=".$region."\"> &gt;&gt;
</a>\n";

echo "<form>";
- echo "<select>\n";
+
+ echo "<select onchange=\"window.location='?year=" . $year .
+ "&amp;region=' + this.options[this.selectedIndex].value\">\n";

$ret = $db->query ("select * from regions");
if ($ret == FALSE)
@@ -442,21 +437,16 @@
exit;
}

- echo "<option onclick=\"window.location='?year=" . $year .
- "value=\"all\">Toutes les r�gions</option>\n";
+ echo "<option value=\"all\">Toutes les r�gions</option>\n";

while ($row = mysql_fetch_object($ret))
{
if ($row->id == $region)
echo
- "<option onclick=\"window.location='?year=" . $year .
- "&amp;region=" . $row->id .
"'\"" .
- "value=\"" . $row->id . "\" selected=\"1\">" . $row->name
. "</option>\n";
+ "<option value=\"" . $row->id . "\" selected=\"1\">" . $row->name .
"</option>\n";
else
echo
- "<option onclick=\"window.location='?year=" . $year .
- "&amp;region=" . $row->id .
"'\"" .
- "value=\"" . $row->id . "\">" . $row->name . "</option>\n";
+ "<option value=\"" . $row->id . "\">" . $row->name . "</option>\n";
}

echo "</select>";




  • [Devel] r196 - trunk, svn, 02/11/2006

Archives gérées par MHonArc 2.6.16.

Haut de le page