<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Les forums de JeBulle.net – [JAVASCRIPT] Verifier les champs d'un formulaire...]]></title>
		<link>https://forums.jebulle.net/topic/245/javascript-verifier-les-champs-dun-formulaire/</link>
		<atom:link href="https://forums.jebulle.net/feed/rss/topic/245/" rel="self" type="application/rss+xml" />
		<description><![CDATA[Messages les plus récents de [JAVASCRIPT] Verifier les champs d'un formulaire....]]></description>
		<lastBuildDate>Thu, 12 Jun 2003 16:01:05 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[[JAVASCRIPT] Verifier les champs d'un formulaire...]]></title>
			<link>https://forums.jebulle.net/post/2653/#p2653</link>
			<description><![CDATA[<p>A mettre dans le &lt;head&gt;&lt;/head&gt; :</p><div class="codebox"><pre><code>&amp;#60;script type=&amp;#34;text/javascript&amp;#34;&amp;#62;
&amp;#60;&amp;#33;--
 &amp;nbsp; function champsok&amp;#40;&amp;#41; {
 &amp;nbsp; &amp;nbsp; &amp;nbsp;if &amp;#40;document.leform.champ_text.value.length == 0&amp;#41; {
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; alert&amp;#40;&amp;#34;Il faut entrer quelque chose &amp;#33;&amp;#33;&amp;#34;&amp;#41;;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return false;
 &amp;nbsp; &amp;nbsp; &amp;nbsp;}

 &amp;nbsp; &amp;nbsp; &amp;nbsp;return true;
 &amp;nbsp; }
//--&amp;#62;
&amp;#60;/script&amp;#62;</code></pre></div><br /><p>Dans le &lt;body&gt; :<br />&lt;!--html--&gt;&lt;/div&gt;&lt;table border=&#039;0&#039; align=&#039;center&#039; width=&#039;95%&#039; cellpadding=&#039;3&#039; cellspacing=&#039;1&#039;&gt;&lt;tr&gt;&lt;td&gt;<strong>HTML</strong> &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td id=&#039;CODE&#039;&gt;&lt;!--html1--&gt;&lt;<span style="color: blue">form method</span>=&quot;<span style="color: orange">post</span>&quot; name=&quot;<span style="color: orange">leform</span>&quot; onsubmit=&quot;<span style="color: orange">return champsok&amp;#40;&amp;#41;</span>&quot; action=&quot;<span style="color: orange">ton_lien.php</span>&quot;&gt;<br />&nbsp; &nbsp;Faut mettre quelque chose ici ==&gt; <br />&nbsp; &nbsp;&lt;<span style="color: blue">input type</span>=&quot;<span style="color: orange">text</span>&quot; name=&quot;<span style="color: orange">champ_text</span>&quot;&nbsp; size=&quot;<span style="color: orange">20</span>&quot;&gt;&lt;<span style="color: blue">br</span>&gt;<br />&nbsp; &nbsp;&lt;<span style="color: blue">input type</span>=&quot;<span style="color: orange">submit</span>&quot; name=&quot;<span style="color: orange">Go</span>&quot; value=&quot;<span style="color: orange">Go &amp;#33;</span>&quot;&gt;<br />&lt;<span style="color: blue">/form</span>&gt;&lt;!--html2--&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;div class=&#039;postcolor&#039;&gt;&lt;!--html3--&gt;</p><p>Le champ &quot;champ_text&quot; sera tester lorsque l&amp;#39;on clique sur le bouton &quot;Go &amp;#33;&quot;</p><p>Le code peut s&amp;#39;appliquer a tout type de champ, il suffit juste de rajouter le petit bout de code en JavaScript permettant de la tester.</p>]]></description>
			<author><![CDATA[null@example.com (Cyberbob002)]]></author>
			<pubDate>Thu, 12 Jun 2003 16:01:05 +0000</pubDate>
			<guid>https://forums.jebulle.net/post/2653/#p2653</guid>
		</item>
	</channel>
</rss>
