<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://www.odelia-technologies.com" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>odelia technologies - JavaScript</title>
 <link>http://www.odelia-technologies.com/taxonomy/term/34/0</link>
 <description></description>
 <language>fr</language>
<item>
 <title>Les effets spectaculaires d’AJAX dans une application Grails !</title>
 <link>http://www.odelia-technologies.com/node/143</link>
 <description>&lt;p&gt;Le framework Grails contient dans sa librairie de tags plusieurs éléments réservés au support d&amp;#39;AJAX. Nous donnons dans cet article, des exemples d&amp;#39;utilisation des éléments &lt;code class=&quot;geshifilter&quot;&gt;g:remoteFonction&lt;/code&gt; et &lt;code class=&quot;geshifilter&quot;&gt;g:remoteLink&lt;/code&gt;, et montrons comment appliquer des effets visuels dans la mise à jour partielle d&amp;#39;une page web avec la librairie &lt;a class=&quot;lien_externe&quot; target=&quot;_blank&quot; href=&quot;http://script.aculo.us/&quot;&gt;scripta.culo.us&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://www.odelia-technologies.com/node/143&quot;&gt;en lire plus&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://www.odelia-technologies.com/node/143#comment</comments>
 <category domain="http://www.odelia-technologies.com/taxonomy/term/33">AJAX</category>
 <category domain="http://www.odelia-technologies.com/taxonomy/term/34">JavaScript</category>
 <category domain="http://www.odelia-technologies.com/taxonomy/term/49">Scriptaculous</category>
 <category domain="http://www.odelia-technologies.com/taxonomy/term/58">AJAX</category>
 <category domain="http://www.odelia-technologies.com/Grails">Grails</category>
 <category domain="http://www.odelia-technologies.com/taxonomy/term/45">GSP</category>
 <pubDate>Wed, 24 Oct 2007 22:08:02 +0200</pubDate>
 <dc:creator>odelia technologies</dc:creator>
 <guid isPermaLink="false">143 at http://www.odelia-technologies.com</guid>
</item>
<item>
 <title>Menu animé en images</title>
 <link>http://www.odelia-technologies.com/node/129</link>
 <description>&lt;p&gt;&lt;strong&gt;Image Menu&lt;/strong&gt; de &lt;a target=&quot;_blanck&quot; class=&quot;lien_externe&quot; href=&quot;http://www.phatfusion.net/&quot;&gt;Phatfusion&lt;/a&gt; est un élégant menu animé à base d&#039;images, utilisant la librairie &lt;a target=&quot;_blanck&quot; class=&quot;lien_externe&quot; href=&quot;http://mootools.net/&quot;&gt;mootools&lt;/a&gt;. Pour fonctionner, une page web doit inclure dans son en-tête les fichiers JavaScript &lt;code class=&quot;geshifilter&quot;&gt;imageMenu.js&lt;/code&gt; et &lt;code class=&quot;geshifilter&quot;&gt;mootools.js&lt;/code&gt;, ainsi que le fichier CSS &lt;code class=&quot;geshifilter&quot;&gt;imageMenu.css&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Le menu doit être défini dans la page au moyen d&#039;une liste HTML contenant autant d&#039;éléments &lt;code class=&quot;geshifilter&quot;&gt;LI&lt;/code&gt; que nécessaire : chaque élément &lt;code class=&quot;geshifilter&quot;&gt;LI&lt;/code&gt; déclare l&#039;attribut &lt;code class=&quot;geshifilter&quot;&gt;class&lt;/code&gt; avec la valeur &lt;code class=&quot;geshifilter&quot;&gt;kwick opt&amp;lt;n&amp;gt;&lt;/code&gt;, où &lt;n&gt; peut prendre les valeurs 1, 2, ..., 5.&lt;br/&gt;
En effet, le fichier &lt;code class=&quot;geshifilter&quot;&gt;imageMenu.css&lt;/code&gt; définit des sélecteurs CSS pour les classes opt1, opt2, ..., opt5 et permet ainsi d&#039;associer une image pour chaque élément du menu.&lt;/p&gt;
&lt;p&gt;Voici Image Menu en action avec trois éléments de menu :&lt;/p&gt;
&lt;div id=&quot;kwick&quot;&gt;
			&lt;ul class=&quot;kwicks&quot;&gt;
				&lt;li class=&quot;kwick opt1&quot;&gt;&lt;span&gt;Lanscapes&lt;/span&gt; &lt;/li&gt;
				&lt;li class=&quot;kwick opt2&quot;&gt;&lt;span&gt;People&lt;/span&gt; &lt;/li&gt;
				&lt;li class=&quot;kwick opt3&quot;&gt;&lt;span&gt;Nature&lt;/span&gt; &lt;/li&gt;	
			&lt;/ul&gt;
		&lt;/div&gt;
		&lt;script type=&quot;text/javascript&quot;&gt;
			function test()
			{
				alert(&#039;Sélection : &#039; + myMenu.options.selected);
			}
			
			var myMenu = new ImageMenu($$(&#039;#kwick .kwick&#039;),{openWidth:200, onClick: test});
		&lt;/script&gt;
&lt;br/&gt;
&lt;p&gt;Dans cet exemple, le click sur une image est détectée et une fonction JavaScript est appelée, permettant ainsi l&#039;affichage d&#039;un message utilisateur.&lt;br/&gt;Si vous souhaitiez provoquer la navigation vers une URL particulière, vous pouvez avoir recours à l&#039;objet JavaScript &lt;code class=&quot;geshifilter&quot;&gt;window&lt;/code&gt;, comme ceci :&lt;/p&gt;
&lt;p&gt;&lt;code class=&quot;geshifilter javascript&quot;&gt;window.&lt;span class=&quot;me1&quot;&gt;location&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;href&lt;/span&gt; = &lt;span class=&quot;st0&quot;&gt;&#039;http://www.odelia-technologies.com/&#039;&lt;/span&gt;;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Le fichier attaché à cet article contient les sources de cette démonstration.&lt;/p&gt;</description>
 <comments>http://www.odelia-technologies.com/node/129#comment</comments>
 <category domain="http://www.odelia-technologies.com/taxonomy/term/48">CSS</category>
 <category domain="http://www.odelia-technologies.com/taxonomy/term/34">JavaScript</category>
 <category domain="http://www.odelia-technologies.com/taxonomy/term/65">mootools</category>
 <category domain="http://www.odelia-technologies.com/taxonomy/term/66">Phatfusion</category>
 <enclosure url="http://www.odelia-technologies.com/files/ImageMenu.zip" length="274220" type="application/x-zip-compressed" />
 <pubDate>Sat, 18 Aug 2007 07:32:15 +0200</pubDate>
 <dc:creator>odelia technologies</dc:creator>
 <guid isPermaLink="false">129 at http://www.odelia-technologies.com</guid>
</item>
<item>
 <title>Valider facilement des formulaires web avec style</title>
 <link>http://www.odelia-technologies.com/node/112</link>
 <description>&lt;p&gt;Andrew Tetlaw décrit dans le billet &lt;a class=&quot;lien_externe&quot; href=&quot;http://tetlaw.id.au/view/javascript/really-easy-field-validation&quot; target=&quot;_blank&quot;&gt;Really easy field validation&lt;/a&gt; de son blog &lt;a class=&quot;lien_externe&quot; href=&quot;http://tetlaw.id.au/view/home/&quot; target=&quot;_blank&quot;&gt;DEXAGOGO&lt;/a&gt;, une librairie JavaScript permettant de valider facilement les champs d&amp;#39;un formulaire web.&lt;/p&gt;
&lt;p&gt;
L&#039;idée principale est d&#039;associer des classes CSS particulières aux contrôles d&#039;entrée HTML, pour que la librairie puisse en valider le contenu.&lt;br/&gt;
Par exemple, si vous souhaitez que dans une zone d&#039;édition du formulaire, l&#039;utilisateur saisisse obligatoirement une adresse électronique valide, vous utiliserez les classes CSS prédéfinies &lt;code class=&quot;geshifilter&quot;&gt;required&lt;/code&gt; et &lt;code class=&quot;geshifilter&quot;&gt;validate-email&lt;/code&gt;, comme ceci :&lt;/p&gt;
&lt;p&gt;
&lt;div class=&quot;geshifilter&quot;&gt;&lt;span class=&quot;sc2&quot;&gt;&lt;a href=&quot;http://december.com/html/4/element/input.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;&amp;lt;input&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;class&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;&amp;quot;required validate-email&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;id&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;&amp;quot;test&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;name&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;&amp;quot;test&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;title&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;&amp;quot;Adresse électronique&amp;quot;&lt;/span&gt;/&lt;span class=&quot;kw2&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/p&gt;
&lt;p&gt;
Au moment de la validation (par défaut au moment de la soumission du formulaire), si une donnée saisie se révèle invalide, la librairie fait apparaître un message d&#039;erreur prédéfini ou bien celui que vous avez indiqué.&lt;br/&gt;Ce message apparaît avec un effet de type &quot;fade-in&quot;, si vous avez référencé la librairie &lt;code class=&quot;geshifilter&quot;&gt;effects.js&lt;/code&gt; de &lt;a class=&quot;lien_externe&quot; href=&quot;http://script.aculo.us/&quot; target=&quot;_blank&quot;&gt;Scriptaculous&lt;/a&gt; dans l&#039;en-tête de la page HTML. 
&lt;/p&gt;
&lt;p&gt;
Voici un exemple de formulaire web très simple utilisant cette librairie en version 1.5.4.1, avec l&#039;option qui demande la validation d&#039;un champ lorsque celui-ci perd le focus :
&lt;/p&gt;
&lt;p&gt;
  &lt;form id=&quot;test&quot; action=&quot;#&quot; method=&quot;get&quot;&gt;
    &lt;div&gt;&lt;label for=&quot;champ1&quot;&gt;Champ requis&lt;/label&gt; :&lt;/div&gt;
    &lt;div&gt;&lt;input class=&quot;required&quot; id=&quot;champ1&quot; name=&quot;champ1&quot; title=&quot;Champ1&quot;/&gt;&lt;/div&gt;
			
    &lt;div&gt;&lt;label for=&quot;champ2&quot;&gt;Champ requis avec message personnalisé &lt;/label&gt; :&lt;/div&gt;						
    &lt;div&gt;&lt;input class=&quot;required&quot; id=&quot;champ2&quot; name=&quot;champ2&quot; title=&quot;Champ2&quot;/&gt;&lt;/div&gt;
    &lt;div id=&quot;advice-required-champ2&quot; style=&quot;display:none&quot;&gt;Ce champ est obligatoire !&lt;/div&gt;
			
    &lt;div&gt;&lt;label for=&quot;champ3&quot;&gt;Votre adresse électronique&lt;/label&gt; :&lt;/div&gt;									
    &lt;div&gt;&lt;input class=&quot;required validate-email&quot; id=&quot;champ3&quot; name=&quot;champ3&quot; title=&quot;Champ3&quot;/&gt;&lt;/div&gt;
						
    &lt;p&gt;&lt;input type=&quot;submit&quot; value=&quot;Test&quot;/&gt;&lt;/p&gt;
  &lt;/form&gt;
  &lt;script type=&quot;text/javascript&quot;&gt;
    new Validation(&#039;test&#039;, {immediate : true}); // ou new Validation(document.forms[0], {immediate : true});
  &lt;/script&gt;    		        
&lt;/p&gt;</description>
 <comments>http://www.odelia-technologies.com/node/112#comment</comments>
 <category domain="http://www.odelia-technologies.com/taxonomy/term/48">CSS</category>
 <category domain="http://www.odelia-technologies.com/taxonomy/term/34">JavaScript</category>
 <category domain="http://www.odelia-technologies.com/taxonomy/term/47">Prototype</category>
 <category domain="http://www.odelia-technologies.com/taxonomy/term/49">Scriptaculous</category>
 <pubDate>Wed, 07 Mar 2007 22:49:23 +0100</pubDate>
 <dc:creator>odelia technologies</dc:creator>
 <guid isPermaLink="false">112 at http://www.odelia-technologies.com</guid>
</item>
<item>
 <title>Des boîtes de dialogue web avec ThickBox 2.1</title>
 <link>http://www.odelia-technologies.com/node/88</link>
 <description>&lt;p&gt;&lt;a class=&quot;lien_externe&quot; href=&quot;http://jquery.com/demo/thickbox/&quot; target=&quot;_blank&quot;&gt;ThickBox 2.1&lt;/a&gt; est une librairie écrite en JavaScript qui permet l&amp;#39;affichage de pages web avec un comportement identique à celui des boîtes de dialogue modales qui requièrent l&amp;#39;attention de l&amp;#39;utilisateur.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://www.odelia-technologies.com/node/88&quot;&gt;en lire plus&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://www.odelia-technologies.com/node/88#comment</comments>
 <category domain="http://www.odelia-technologies.com/taxonomy/term/33">AJAX</category>
 <category domain="http://www.odelia-technologies.com/taxonomy/term/34">JavaScript</category>
 <category domain="http://www.odelia-technologies.com/taxonomy/term/32">jQuery</category>
 <category domain="http://www.odelia-technologies.com/taxonomy/term/31">ThickBox</category>
 <pubDate>Tue, 07 Nov 2006 23:19:12 +0100</pubDate>
 <dc:creator>odelia technologies</dc:creator>
 <guid isPermaLink="false">88 at http://www.odelia-technologies.com</guid>
</item>
</channel>
</rss>
