Valid XHTML    Valid CSS2    

Listing du fichier fa.js

 

00001     
00002     // (gH) -_- fa.js ; TimeStamp (unix) : 07 Mars 2013 vers 16:56
00003     
00004     function ucFirst (str) { // # à ne pas confondre avec ucwords...
00005     
00006      // http://kevin.vanzonneveld.net
00007      // + original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
00008      // + bugfixed by: Onno Marsman
00009      // + improved by: Brett Zamir (http://brett-zamir.me)
00010      // * example 1: ucfirst('kevin van zonneveld');
00011      // * returns 1: 'Kevin van zonneveld'
00012     
00013      // ajout (gH) ; test sur la longueur de str
00014     
00015      if (str.length==0) {
00016      return str
00017      } else {
00018      str += '' ;
00019      var f = str.charAt(0).toUpperCase();
00020      return f + str.substr(1).toLowerCase() ;
00021      } // fin si
00022     
00023     } // fin de fonction ucFirst
00024     
00025     // ##########################################################################
00026     
00027     String.prototype.ucfirst = function () {
00028     
00029      return ucFirst(this)
00030     
00031     } // fin de fonction ucfirst
00032     
00033     // ##########################################################################
00034     
00035     function montreChamps(laTable) {
00036     
00037      autreTable = "artistes" ;
00038      if (laTable=="artistes") { autreTable = "films" }
00039     
00040      window.document.getElementById("champs"+laTable.ucfirst()).setAttribute("class","visible")
00041      window.document.getElementById("champs"+autreTable.ucfirst()).setAttribute("class","invisible")
00042      window.document.getElementById("pcrit").setAttribute("class","visible")
00043      window.document.getElementById("envoi").setAttribute("class","visible")
00044     
00045      // pour transmettre à php le choix de la table
00046     
00047      window.document.getElementById("nomtableChoix").value = laTable
00048     
00049     } // fin de fonction montreChamps

Pour ne pas voir les numéros de ligne, ajoutez &nl=non à la suite du nom du fichier.

 

 

retour gH    Retour à la page principale de   (gH)