xillon posteets tagged html  [ Profile ]

Sort by: Date / Title /

  1. 10 months ago and saved by 1 other
    it works in IE 5, 6, 7, and 8. for more info: http://code.google.com/p/ie7-js/ funciona en IE 5, 6, 7 y 8 para mas informacion: http://code.google.com/p/ie7-js/
    1. /*
    2. original: http://code.google.com/p/ie7-js/
    3. */
    4.     <!--[if lt IE 8]>
    5.     <script src="http://ie7-js.googlecode.com/svn/version/2.0(beta2)/IE8.js" type="text/javascript"></script>
    6.     <![endif]-->
    7. </head>
  2. 1 year ago
    1. <span style="cursor: crosshair;">Viseur</span>
    2. <span style="cursor: pointer;">Main</span>
    3. <span style="cursor: wait;">Attente</span>
    4. <span style="cursor: help;">Point d'interrogation</span>
    5. <span style="cursor: text;">Texte</span>
    6. <span style="cursor: move;">Objet déplaçable</span>
    7. <span style="cursor: n-resize">Changer la taille vers le haut</span>
    8. <span style="cursor: s-resize">Changer la taille vers le bas</span>
    9. <span style="cursor: e-resize">Changer la taille vers la droite</span>
    10. <span style="cursor: w-resize">Changer la taille vers la gauche</span>
    11. <span style="cursor: ne-resize">Changer la taille haut+droite</span>
    12. <span style="cursor: nw-resize">Changer la taille haut+gauche</span>
    13. <span style="cursor: se-resize">Changer la taille bas+droite</span>
    14. <span style="cursor: nw-resize">Changer la taille bas+gauche</span>
    15. <span style="cursor: auto">Automatique (le navigateur décide)</span>
    16. <span style="cursor: default">Curseur par défaut</span>
  3. 1 year ago
    1. function selectTable($nomtable, $where = NULL, $order = NULL)
    2.          {
    3.             $sql = "SELECT * FROM $nomtable";
    4.             if ( $where !== NULL ) $sql .= " WHERE $where";
    5.             if ($order !== NULL)$sql.=" ORDER BY $order ";
    6.            
    7.             $query=mysql_query($sql);
    8.            
    9.             $ret = array();
    10.             while ( $donnee = mysql_fetch_assoc($query))
    11.             {
    12.                $ret[] = $donnee;
    13.             }
    14.             return $ret;
    15.          }
    16.          
    17.          function sqlSelect($sqlDonnee, $nomCol, $valCol)
    18.          {
    19.             for($i = 0 ; $i<count($sqlDonnee) ; $i++)
    20.             {
    21.                $selectDonee["name"][$i] = $sqlDonnee[$i][$nomCol];
    22.                $selectDonee["value"][$i] = $sqlDonnee[$i][$valCol];
    23.             }
    24.          return $selectDonee;
    25.          }
    26.          
    27.          function htmlSelect($nom, $options, $selected = NULL, $css = NULL)
    28.          {
    29.             $select  = "<select name=\"".htmlentities($nom)."\"";
    30.             if ( $css !== NULL )
    31.                $select .= " $css>";
    32.             else
    33.                $select .= ">";
    34.  
    35.             for($i = 0 ; $i<count($options["name"]) ; $i++)
    36.             {
    37.                if ( $selected !== NULL && $selected == $options["value"][$i] )
    38.                   $select .= "<option value=\"".$options["value"][$i]."\" selected=\"selected\">".$options["name"][$i]."</option>\n";
    39.                else
    40.                   $select .= "<option value=\"".$options["value"][$i]."\">".$options["name"][$i]."</option>\n";
    41.             }
    42.             $select .= "</select>\n";
    43.  
    44.             return $select;
    45.          }
    46.  
    47. /*** Exemple utilisation ***/
    48. /* <option selected> par defaut pour le pays ayant l'id 72 */
    49.          $paysSelect = isset($_POST["pays"]) ? ($_POST["pays"]) : ("72");
    50.          
    51.          $selectPays=selectTable("pays");
    52.          $pays=sqlSelect($selectPays,"nom","id");         
    53.          echo htmlSelect("id", $pays, $paysSelect); // on construit notre <select>
  4. sponsorised links

First / Previous / Next / Last / Page 1 of 1 (3 posteets)