Hello, I am trying to learn the use of prototye in stead of using regular javascript. I would like to know how to replace the following syntax with one from prototype. After a few tryouts, i can't seem to get this work :/
<script type="text/javascript"> // textes par défaut zones de saisie var TexteDefautRechercheFiche = "Recherche par avatar, compte, email ou userid"; Event.observe(window, 'load', InitialisationPage); Event.observe(window, 'resize', this.InitialisationPage.bindAsEventListener(this)); function InitialisationPage() { // gestion de la valeur par défaut pour la zone de recherche de fiches joueurs document.getElementById("recherchefiche").value = TexteDefautRechercheFiche; Event.observe('recherchefiche', 'focus', function(){ if(document.getElementById("recherchefiche").value == TexteDefautRechercheFiche) document.getElementById("recherchefiche").clear(); }); } </script> The html part is simple : <input type="text" name="recherchefiche" id="recherchefiche" class="saisietextestandard" value="" /> I tryed to change this line : document.getElementById("recherchefiche").value = TexteDefautRechercheFiche; into this one : $F('recherchefiche') = TexteDefautRechercheFiche; but it don't seem to work... Any idea? -- You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.