Précédent   Forum des professionnels en informatique > Webmasters - Développement Web > JavaScript
JavaScript Forum programmation JavaScript. Lire : Cours JavaScript, FAQ JavaScript, Toutes les FAQ JavaScript et Sources JavaScript
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 01/11/2011, 02h33   #1
Membre du Club
 
Avatar de bond70
 
Inscription : septembre 2008
Messages : 271
Détails du profil
Informations forums :
Inscription : septembre 2008
Messages : 271
Points : 45
Points : 45
Par défaut Vérifier que les champs sont remplis - formulaire

Bonjour,

Je souhaiterais implémenter une vérification de mon formulaire en javascript pour vérifier si tous les champs sont rempli.

Si ce n'est pas le cas, il faut afficher un message texte à côté du champ (pas une fenêtre qui s'ouvre)

Voici mon formulaire :

Code :
1
2
3
4
5
6
7
8
9
10
<form name="landing-page-whitepaper" method="post" action="http://now.eloqua.com/e/f2.aspx" id="regForm">
<input type="hidden" value="landing-page-whitepaper" name="elqFormName">
<input type="hidden" value="1584" name="elqSiteID">
<input type="hidden" value="" name="elqCustomerGUID">
<input type="hidden" value="0" name="elqCookieWrite"><br><label>First Name*</label><br>
<input type="text" size="40" value="" name="FirstName" onblur="" onfocus="" style="width: 275px;" class="elqField" id="FirstName"><br><label>Last Name*</label><br>
<input type="text" size="40" value="" name="LastName" onblur="" onfocus="" style="width: 275px;" class="elqField" id="LastName"><br><label>Company*</label><br>
<input type="text" size="40" value="" name="Company" onblur="" onfocus="" style="width: 275px;" class="elqField" id="Company"><br><label>Email Address*</label><br>
<input type="text" size="40" value="" name="EmailAddress" onblur="" onfocus="" style="width: 275px;" class="elqField" id="EmailAddress"><br><br>
<input type="submit" value="Submit" name="submit" onblur="" onfocus="" class="elqSubmit" id="submit"></form>
Pourriez-vous me dire quel type de code me conviendrais.
Et où dois-je l'installer ?

Merci à vous !
bond70 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 01/11/2011, 02h45   #2
Membre Expert
 
Avatar de Willpower
 
Homme Boris Dessy
sans emploi
Inscription : décembre 2010
Messages : 872
Détails du profil
Informations personnelles :
Nom : Homme Boris Dessy
Localisation : Belgique

Informations professionnelles :
Activité : sans emploi

Informations forums :
Inscription : décembre 2010
Messages : 872
Points : 1 381
Points : 1 381
une idée de solution (je n'ai pas testé) (à insérer dans une balise script) :

Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
document.forms['landing-page-whitepaper'].onsubmit = function(){
  var inputs = document.forms['landing-page-whitepaper'].elements;
  for(var i=0;i<inputs.length;i++){
    if(inputs[i].type != 'hidden' && !inputs[i].value){
      var myAlert = document.createElement('span');
      myAlert.innerHTML = "ce champ est vide";
      if(inputs[i].nextSibling)
        inputs[i].nextSibling.insertBefore(myAlert );
      else
        inputs[i].parentNode.appendChild(myAlert );
      return false;
    }
    return true;
  }
};
Willpower est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 01/11/2011, 03h23   #3
Membre du Club
 
Avatar de bond70
 
Inscription : septembre 2008
Messages : 271
Détails du profil
Informations forums :
Inscription : septembre 2008
Messages : 271
Points : 45
Points : 45
Bonjour,

Merci tout d'abord pour votre aide !

J'ai donc inséré le code précédent entre des balises <script> et j'ai mis le tout entre les balises <head> de la page.

Résultat => quand je valide le formulaire sans qu'aucun champ ne soit remplis, celà ne fait rien....

Voici le code de toute la page :

ligne 117:script
ligne 207:formulaire


Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US">
<head>
<meta name="google-site-verification" content="8zX6T91Mo4wZNFnm5kPmaqqxVBxSLG3ODiZBO_a8VRU" />
<meta name="msvalidate.01" content="BACBF8B54575E49109D3B04FFF407750" />
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
    <title>Red & White Papers</title>
	<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
 
	<link rel="shortcut icon" href="http://www.jobs.rookierecruits.com/GetWhitelabelFile.aspx?whiteLabelFileID=18496"/>
 
	<link rel="stylesheet" type="text/css" href="http://www.rookierecruits.com/wp-content/themes/rookierecruit/style.css" />
 
 
	<link rel='stylesheet' id='admin-bar-css'  href='http://www.rookierecruits.com/wp-includes/css/admin-bar.css?ver=20110622' type='text/css' media='all' />
 
<link rel='stylesheet' id='tubepress-css'  href='http://www.rookierecruits.com/wp-content/plugins/tubepress/sys/ui/themes/default/style.css?ver=3.2.1' type='text/css' media='all' />
<script type='text/javascript' src='http://www.rookierecruits.com/wp-includes/js/l10n.js?ver=20101110'></script>
<script type='text/javascript' src='http://www.rookierecruits.com/wp-includes/js/jquery/jquery.js?ver=1.6.1'></script>
<script type='text/javascript' src='http://www.rookierecruits.com/wp-content/plugins/tubepress/sys/ui/static/js/tubepress.js?ver=3.2.1'></script>
<script type='text/javascript' src='http://www.rookierecruits.com/wp-includes/js/comment-reply.js?ver=20090102'></script>
<script type='text/javascript' src='http://www.rookierecruits.com/wp-content/plugins/vslider/js/vslider.js?ver=3.2.1'></script>
<script type='text/javascript' src='http://www.rookierecruits.com/wp-content/plugins/google-analyticator/external-tracking.min.js?ver=6.2'></script>
<link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://www.rookierecruits.com/xmlrpc.php?rsd" />
<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="http://www.rookierecruits.com/wp-includes/wlwmanifest.xml" /> 
<link rel='index' title='Rookie Recruits' href='http://www.rookierecruits.com/' />
<link rel='prev' title='Request-a-Consultation' href='http://www.rookierecruits.com/request-a-consultation/' />
 
<link rel='next' title='Send Me a Brochure' href='http://www.rookierecruits.com/send-me-a-brochure/' />
<meta name="generator" content="WordPress 3.2.1" />
<link rel='canonical' href='http://www.rookierecruits.com/red-white-papers/' />
		<link rel="stylesheet" type="text/css" href="http://www.rookierecruits.com/wp-content/plugins/nivo-slider-for-wordpress/css/nivoslider4wp.css" />
		<style>
		#slider{
			width:640px;
			height:219px;
			background:transparent url(http://www.rookierecruits.com/wp-content/plugins/nivo-slider-for-wordpress/css/images/loading.gif) no-repeat 50% 50%;
		}
		.nivo-caption {
			background:#000000;
			color:#ffffff;
		}
		</style>
	<script type="text/javascript">function getTubePressBaseUrl(){return "http://www.rookierecruits.com/wp-content/plugins/tubepress";}</script>
<style type="text/css" media="print">#wpadminbar { display:none; }</style>
<style type="text/css" media="screen">
	html { margin-top: 28px !important; }
	* html body { margin-top: 28px !important; }
</style>
<!-- Google Analytics Tracking by Google Analyticator 6.2: http://ronaldheft.com/code/analyticator/ -->
<script type="text/javascript">
	var analyticsFileTypes = [''];
	var analyticsEventTracking = 'enabled';
 
</script>
<script type="text/javascript">
	var _gaq = _gaq || [];
	_gaq.push(['_setAccount', 'UA-10765999-24']);
	_gaq.push(['_trackPageview']);
	_gaq.push(['_trackPageLoadTime']);
 
	(function() {
		var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
		ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
		var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
	})();
</script>
	<link rel="alternate" type="application/rss+xml" href="http://www.rookierecruits.com/feed/" title="Rookie Recruits latest posts" />
	<link rel="alternate" type="application/rss+xml" href="http://www.rookierecruits.com/comments/feed/" title="Rookie Recruits latest comments" />
	<link rel="pingback" href="http://www.rookierecruits.com/xmlrpc.php" />	
 
	<script type="text/javascript" src="http://www.rookierecruits.com/wp-content/themes/rookierecruit/cookie.js"></script>
	<script type="text/javascript" src="http://www.rookierecruits.com/wp-content/themes/rookierecruit/simplyscroll104min.js"></script>
	<script type="text/javascript" src="http://www.rookierecruits.com/wp-content/themes/rookierecruit/myjs.js"></script>
 
 
<script language=javascript>
<!--
	function querySt(ji) {
	   hu = window.location.search.substring(1);
	   gy = hu.split("&");
	   for (i=0;i<gy.length;i++) {
		ft = gy[i].split("=");
		if (ft[0] == ji) {
		 return ft[1];
		}
	   }
	}
	function getUrlVars() {
	   var vars = {};
	   var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) {
		   vars[key] = value;
	   });
	   return vars;
	}
	var from_mobi_site = getUrlVars()["from_mobi_site"];
	if (from_mobi_site != 1)
	{
	   var fullsite = querySt("fullsite");
	   if (fullsite == null)
	   {
		if ((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)) || (screen.width <= 699))
		{
		 var answer = confirm ("I can see that you are on a mobile device. Would you like to go to the mobile site?")
		 if (answer)
		 {
		  location.replace("http://m.rookierecruits.com/");
		 }
		}
	   }
	}
-->
</script>
 
 
<SCRIPT TYPE='text/javascript' LANGUAGE='JavaScript'>
document.forms['landing-page-whitepaper'].onsubmit = function(){
  var inputs = document.forms['landing-page-whitepaper'].elements;
  for(var i=0;i
<inputs.length;i++){
    if(inputs[i].type != 'hidden' && !inputs[i].value){
      var myAlert = document.createElement('span');
      myAlert.innerHTML = "ce champ est vide";
      if(inputs[i].nextSibling)
        inputs[i].nextSibling.insertBefore(myAlert );
      else
        inputs[i].parentNode.appendChild(myAlert );
      return false;
    }
    return true;
  }
};
</SCRIPT>
 
 
</head>
<body class="page page-id-187 page-parent page-template-default logged-in admin-bar">
<div id="r_splash-wrapper">
	<div id="r_splash">
		<div id="r_splash-logo">
			<img src="http://www.rookierecruits.com/wp-content/themes/rookierecruit/images/logo-splash.png" alt="Rookie Recruits" />
 
		</div>
		<div id="r_splash-navigation">
			<a href="?page_id=490"><img src="http://www.rookierecruits.com/wp-content/themes/rookierecruit/images/enter-candidate.png" alt="Enter as Candidate" /></a>
			<a href="#"><img src="http://www.rookierecruits.com/wp-content/themes/rookierecruit/images/enter-employer.png" alt="Enter as Employer" /></a>
		</div>
	</div>
</div>
<div id="r_wrapper">
<div id="r_headWrapper">
	<div id="r_head">
 
		<div id="r_logo">
			<a href="http://www.rookierecruits.com/employer-index/"><img src="http://www.rookierecruits.com/wp-content/themes/rookierecruit/images/logo.png" width="190" height="90" alt="Rookie Recruits" /></a>
		</div>
		<div id="r_social-media-contact">
			<img src="http://www.rookierecruits.com/wp-content/themes/rookierecruit/images/socialmediacontact.png" width="240" height="45" alt="Rookie Recruit" />
			<div>
				<a href="http://www.facebook.com/rookierecruits" target="_blank"><img src="http://www.rookierecruits.com/wp-content/themes/rookierecruit/images/icontopfacebook.png" width="30" height="30" alt="Facebook" /></a>
				<a href="http://www.twitter.com/rookierecruits" target="_blank"><img src="http://www.rookierecruits.com/wp-content/themes/rookierecruit/images/icontoptwitter.png" width="30" height="30" alt="Twitter" /></a>
				<a href="http://www.youtube.com.au/rookierecruits" target="_blank"><img src="http://www.rookierecruits.com/wp-content/themes/rookierecruit/images/icontopyoutube.png" width="30" height="30" alt="Youtube" /></a>
 
				<a href="http://jobs.rookierecruits.com/RSSFeed.aspx?whiteLabelID=638" target="_blank"><img src="http://www.rookierecruits.com/wp-content/themes/rookierecruit/images/icontoprss.png" width="30" height="30" alt="RSS" /></a>
				<a href="http://www.linkedin.com/company/rookie-recruits" target="_blank"><img src="http://www.rookierecruits.com/wp-content/themes/rookierecruit/images/icontoplinkedin.png" width="30" height="30" alt="LinkedIn" /></a>
			</div>
		</div>
		<div id="r_nav">
			<div>
			<div class="menu-employer-main-navigation-container"><ul id="menu-employer-main-navigation" class="menu"><li id="menu-item-1379" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-1379"><a href="http://www.rookierecruits.com/category/employer-central/">Employer Central</a></li>
<li id="menu-item-752" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-752"><a href="http://www.rookierecruits.com/about-us/">Who Are We?</a></li>
 
<li id="menu-item-469" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-469"><a href="http://www.rookierecruits.com/what-we-do-for-you/">What We Do For You</a></li>
<li id="menu-item-474" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-474"><a href="http://www.rookierecruits.com/the-rookies/">The Rookies</a></li>
<li id="menu-item-479" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-479"><a href="http://www.rookierecruits.com/helpful-downloads/">Helpful Downloads</a></li>
<li id="menu-item-563" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-563"><a href="http://www.rookierecruits.com/contact-us-3/">Contact Us</a></li>
</ul></div>	
			</div>
 
		</div>
	</div>
 
</div>
<div id="r_contentWrapper">
 
	<div id="r_content">
 
 
 
 
		<div id="r_primary" class="r_single-column r_right-column">
			<div id="r_mainContentWrapper">
				<div id="r_mainContent">
					<div id="r_mainContentContent">
 
 
						<div id="post-187" class="r_primaryPost r_primaryBox">
 
							<h2><a href="http://www.rookierecruits.com/red-white-papers/" title="Permalink to Red &amp; White Papers" rel="bookmark">Red & White Papers</a></h2>
 
														<!--<span class="r_date">
								Posted on Aug 08th 2011 02:2am							</span>-->
 
							<div class="r_postText">									
 
<p>Red and white papers</p>
 
<div id="r_newsletterSignUp" style="width:400px;height:300px;">
 
<form id="regForm" action="http://now.eloqua.com/e/f2.aspx" method="post" name="landing-page-whitepaper">
 
<input type="hidden" name="elqFormName" value="landing-page-whitepaper" />
<input type="hidden" name="elqSiteID" value="1584" />
<input type="hidden" name="elqCustomerGUID" value="">
<input type="hidden" name="elqCookieWrite" value="0">
 
<label>First Name*</label>
<input id="FirstName" class="elqField" style="width: 275px;" onfocus="" onblur="" type="text" name="FirstName" value="" size="40" />
 
<label>Last Name*</label>
<input id="LastName" class="elqField" style="width: 275px;" onfocus="" onblur="" type="text" name="LastName" value="" size="40" />
 
<label>Company*</label>
<input id="Company" class="elqField" style="width: 275px;" onfocus="" onblur="" type="text" name="Company" value="" size="40" />
 
<label>Email Address*</label>
<input id="EmailAddress" class="elqField" style="width: 275px;" onfocus="" onblur="" type="text" name="EmailAddress" value="" size="40" />
 
<input id="submit" class="elqSubmit" onfocus="" onblur="" type="submit" name="submit" value="Submit" />
 
</form>
 
</div>
 
 
							</div>
						</div><!-- #post-187 -->
 
 
<div id="comments">
	<ul>
			</ul>
									</div><!-- #comments -->	
 
					</div>
				</div>
			</div>
		</div>
 
				<div id="r_secondary">
 
 
				<div class="r_contentBoxWrapper">
					<div class="r_contentBox">
						<div class="r_contentBoxContent">
							<div id="r_newsletterSignUp">
								<img src="http://www.rookierecruits.com/wp-content/themes/rookierecruit/images/newsletter-heading.png" width="150" height="26" />
											<div class="textwidget"><div>
<form name="EmployerNewsletter" id="regForm" method="post" action="http://now.eloqua.com/e/f2.aspx">
 
<input type="hidden" name="elqFormName" value="EmployerNewsletter">
 
<input type="hidden" name="elqSiteID" value="1584">
 
<label>First Name:</label>
 
<input name="FirstName" id="FirstName" class="elqField" value=""  onblur="" onFocus="" size="40" type="text">
 
<br />
 
<label>Email:</label>
 
<input name="EmailAddress" id="EmailAddress" class="elqField" value=""  onblur="" onFocus="" size="40" type="text">
 
<br />
 
<input name="submit" id="submit" class="elqSubmit" value="Submit"  onblur="" onFocus="" type="image" src="http://www.rookierecruits.com/wp-content/themes/rookierecruit/images/newsletter-subscribe-button.png">
 
</form>
</div></div>
 
							</div>
						</div>
					</div>
				</div>
				<div class="r_contentBoxSeperator">&nbsp;</div>
 
			<div class="r_button-group">
 
							<div class="textwidget"><a href="/graduate-program-2/"><img src="http://www.rookierecruits.com/wp-content/themes/rookierecruit/images/graduate-program-long-button.png" width="232" height="38" alt="Graduate Program" /></a></div>
 
 
			</div>
 
 
				<div class="r_contentBoxWrapper" id="r_followers">
					<div class="r_contentBox">
						<div class="r_contentBoxContent">
							<img class="r_headlineIcon"src="http://www.rookierecruits.com/wp-content/themes/rookierecruit/images/twitterfollowersicon.png" width="60" height="43" alt="Twitter Followers" />
							<img src="http://www.rookierecruits.com/wp-content/themes/rookierecruit/images/headlinefollowers.png" width="150" height="26" alt="Twitter Followers"/>
 
 
        <style>
        .stf {overflow:hidden; width: 215px; height:; border:1px solid #94a3c4; margin:auto; margin-bottom:10px; font-family:"lucida grande",tahoma,verdana; }
        .stfhead {background:#eceff5; padding:10px 10px 8px 10px}
        .stfhead span { font-size:10px;}
        .stfstatus {font-size:11px; padding-bottom:5px;}
        .stfheadlink { font-size:14px; font-weight:bold; color:#3b5998; text-decoration:none;}
        .stfbody {border-top:1px solid #ddd; padding:10px 10px 4px 10px; background:#fff}
        .stfbody a { color:#808080;  text-decoration:none;}
        .stffan {float:left; width:55px; font-size:9px;padding-bottom:8px;}
        </style>
        <div class="stf"><div class="stfhead"><img src="http://a1.twimg.com/profile_images/1336631333/Rookie_Recruits_normal.jpeg" style="float:left; width:50; height:50; padding-right:10px" /><div><a class="stfheadlink" href="http://twitter.com/RookieRecruits" target="_blank"><b>Rookie Recruits</b> <span>on Twitter</span></a></div><div style="padding-top:4px;"><a href="http://twitter.com/RookieRecruits" target="_blank"><img src="http://www.rookierecruits.com/wp-content/plugins/show-twitter-followers/follow-me-black.png" border="0" /></a></div></div><div class="stfbody"><div class="stfstatus">Rookie Recruits has 120 followers</div><div class="stffan"><a href="http://twitter.com/sydneyAuEvents" target="_blank"><img src="http://a3.twimg.com/profile_images/1384997476/Sydney_normal.jpg" width="50" height="50" /><div style="text-align:center">sydneyAu</a></div></div><div class="stffan"><a href="http://twitter.com/T_Whitelaw" target="_blank"><img src="http://a0.twimg.com/profile_images/1319654141/thy_normal.jpg" width="50" height="50" /><div style="text-align:center">T_Whitel</a></div></div><div class="stffan"><a href="http://twitter.com/groundupmusicau" target="_blank"><img src="http://a1.twimg.com/profile_images/1487658956/112312_normal.png" width="50" height="50" /><div style="text-align:center">groundup</a></div></div><div class="stffan"><a href="http://twitter.com/thegryffin" target="_blank"><img src="http://a1.twimg.com/profile_images/1118026943/thegryffin_normal.png" width="50" height="50" /><div style="text-align:center">thegryff</a></div></div><div class="stffan"><a href="http://twitter.com/MyBiz2011" target="_blank"><img src="http://a3.twimg.com/profile_images/1519729266/MyBizExpo_TBC_web_normal.jpg" width="50" height="50" /><div style="text-align:center">MyBiz201</a></div></div><div style="clear:both"></div></div></div>	
 
						</div>
 
					</div>
				</div>
				<div class="r_contentBoxSeperator">&nbsp;</div>
 
				<div class="r_contentBoxWrapper" id="r_testimonials">
					<div class="r_contentBox">
						<div class="r_contentBoxContent">
							<a href="/category/employer-testimonials/"><img src="http://www.rookierecruits.com/wp-content/themes/rookierecruit/images/headlinetestimonials.png" alt="Testmonials" /></a>
							<h4>Recent Posts</h4>                <h3><a href="http://www.rookierecruits.com/2011/08/employer-case-studies/">Reed Business Information</a></h3>
 
                                    <p> <img width="215" height="33" src="http://www.rookierecruits.com/wp-content/uploads/2011/08/RBI-Logo.png" class="alignleft post_thumbnail wp-post-image" alt="RBI Logo" title="RBI Logo" /><span class="r_thePost">“Time and time again Rookie Recruits have sourced and delivered strong candidates. Having filled multiple roles for us, they have managed our account with a great deal of quality. This is due to the hard work applied to understand our business, and an ability to access an untapped pool of qual</span><a class="r_readMore" href="http://www.rookierecruits.com/2011/08/employer-case-studies/">(Read more)</a>
                    </p>                 <h3><a href="http://www.rookierecruits.com/2011/08/employer-testimonial-7/">Promena Projects</a></h3>
                                    <p> <img width="215" height="60" src="http://www.rookierecruits.com/wp-content/uploads/2011/08/Promena-Logo-215x60.png" class="alignleft post_thumbnail wp-post-image" alt="Promena Logo" title="Promena Logo" /><span class="r_thePost">“Rookie Recruits provide high quality candidates, at exceptional value for money, that no one else in the recruitment industry has been able to match. I would recommend Rookie Recruits to anybody in any industry!” Bryan Darragh, Operations Director, Promena Projects</span><a class="r_readMore" href="http://www.rookierecruits.com/2011/08/employer-testimonial-7/">(Read more)</a>
                    </p>                 <h3><a href="http://www.rookierecruits.com/2011/08/employer-testimonial-6/">FlexiGroup</a></h3>
 
                                    <p> <img width="215" height="39" src="http://www.rookierecruits.com/wp-content/uploads/2011/08/FlexiGroup-Logo-215x39.png" class="alignleft post_thumbnail wp-post-image" alt="FlexiGroup Logo" title="FlexiGroup Logo" /><span class="r_thePost">&nbsp; ” I have enjoyed my interactions with Rookie Recruits so far and the business was really impressed with your value proposition – we absolutely want to work with you in the future so if any roles do come up I will be giving you a call!” Katia Dekort, HR Consultant, FlexiGroup</span><a class="r_readMore" href="http://www.rookierecruits.com/2011/08/employer-testimonial-6/">(Read more)</a>
                    </p> 
						</div>
					</div>
				</div>	
				<div class="r_contentBoxSeperator">&nbsp;</div>
 
 
		</div>		
 
	</div>
</div>
<div id="r_footWrapper">
	<div id="r_foot">
		<div id="r_foot_nav">
 
			<div class="menu-employer-footer-menu-container"><ul id="menu-employer-footer-menu" class="menu"><li id="menu-item-520" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-520"><a href="http://www.rookierecruits.com/privacy-statement-2/">Privacy Statement</a></li>
<li id="menu-item-521" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-521"><a href="http://www.rookierecruits.com/about-us/">Who Are We?</a></li>
<li id="menu-item-522" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-522"><a href="http://www.rookierecruits.com/contact-us-3/">Contact Us</a></li>
<li id="menu-item-1301" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-1301"><a href="http://www.rookierecruits.com/sitemap/">Sitemap</a></li>
 
<li id="menu-item-1302" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-1302"><a href="http://jobs.rookierecruits.com/jobbrowse.aspx">Browse Jobs</a></li>
<li id="menu-item-558" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-558"><a href="http://www.rookierecruits.com/candidate-index/">Candidate Section</a></li>
<li id="menu-item-1303" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-1303"><a href="http://www.jxt.com.au">Powered by JXT</a></li>
</ul></div>	
		</div>
		<div id="r_copyright">
			<p>
				Rookie Recruits Pty Ltd &copy; All Rights Reserved 2011.
			</p>
 
		</div>
	</div>
</div>
</div>
<script type='text/javascript' src='http://www.rookierecruits.com/wp-includes/js/admin-bar.js?ver=20110131'></script>
 
		<script type="text/javascript" src="http://www.rookierecruits.com/wp-content/plugins/nivo-slider-for-wordpress/js/jquery.nivo.slider.pack.js"></script>
		<script type="text/javascript">
		var $nv4wp = jQuery.noConflict();
		$nv4wp(window).load(function() {
			$nv4wp('#slider').nivoSlider({
				effect:'random',
				slices:15, // For slice animations
				boxCols: 4, // For box animations
				boxRows: 2, // For box animations
				animSpeed:500, // Slide transition speed
				pauseTime:3000, // How long each slide will show
				startSlide:0, // Set starting Slide (0 index)
				directionNav:true, //Next & Prev
				directionNavHide:true, //Only show on hover
				controlNav:true, // 1,2,3... navigation
				controlNavThumbs:false, // Use thumbnails for Control Nav
				controlNavThumbsFromRel:false, // Use image rel for thumbs
				controlNavThumbsSearch: '.jpg', // Replace this with...
				controlNavThumbsReplace: '_thumb.jpg', // ...this in thumb Image src
				keyboardNav:true, //Use left & right arrows
				pauseOnHover:true, //Stop animation while hovering
				manualAdvance:false, //Force manual transitions
				captionOpacity:0.8, //Universal caption opacity
				prevText: 'Prev', // Prev directionNav text
				nextText: 'Next', // Next directionNav text
				beforeChange: function(){}, // Triggers before a slide transition
				afterChange: function(){}, // Triggers after a slide transition
				slideshowEnd: function(){}, // Triggers after all slides have been shown
				lastSlide: function(){}, // Triggers when last slide is shown
				afterLoad: function(){} // Triggers when slider has loaded
			});
		});
		</script>
				<div id="wpadminbar">
			<div class="quicklinks">
 
				<ul>
 
		<li id="wp-admin-bar-my-account-with-avatar" class="menupop">
			<a href="http://www.rookierecruits.com/wp-admin/profile.php"><span><img alt='' src='http://0.gravatar.com/avatar/acf7cb2465ce6fd2b666d7762deb8527?s=16&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D16&amp;r=G' class='avatar avatar-16 photo' height='16' width='16' />Lincoln</span></a>
 
						<ul>
 
		<li id="wp-admin-bar-edit-profile" class="">
			<a href="http://www.rookierecruits.com/wp-admin/profile.php">Edit My Profile</a>
 
 
					</li>											
		<li id="wp-admin-bar-logout" class="">
 
			<a href="http://www.rookierecruits.com/wp-login.php?action=logout&_wpnonce=8870fc6fad">Log Out</a>
 
 
					</li>							</ul>
 
					</li>													
		<li id="wp-admin-bar-dashboard" class="">
			<a href="http://www.rookierecruits.com/wp-admin/">Dashboard</a>
 
 
					</li>													
		<li id="wp-admin-bar-edit" class="">
 
			<a href="http://www.rookierecruits.com/wp-admin/post.php?post=187&action=edit">Edit Page</a>
 
 
					</li>													
		<li id="wp-admin-bar-new-content" class="menupop">
			<a href="http://www.rookierecruits.com/wp-admin/post-new.php?post_type=post"><span>Add New</span></a>
 
						<ul>
 
		<li id="wp-admin-bar-new-post" class="">
			<a href="http://www.rookierecruits.com/wp-admin/post-new.php?post_type=post">Post</a>
 
 
					</li>											
		<li id="wp-admin-bar-new-page" class="">
			<a href="http://www.rookierecruits.com/wp-admin/post-new.php?post_type=page">Page</a>
 
 
					</li>											
		<li id="wp-admin-bar-new-media" class="">
			<a href="http://www.rookierecruits.com/wp-admin/media-new.php">Media</a>
 
 
					</li>											
		<li id="wp-admin-bar-new-link" class="">
 
			<a href="http://www.rookierecruits.com/wp-admin/link-add.php">Link</a>
 
 
					</li>											
		<li id="wp-admin-bar-new-user" class="">
			<a href="http://www.rookierecruits.com/wp-admin/user-new.php">User</a>
 
 
					</li>											
		<li id="wp-admin-bar-new-theme" class="">
			<a href="http://www.rookierecruits.com/wp-admin/theme-install.php">Theme</a>
 
 
					</li>											
		<li id="wp-admin-bar-new-plugin" class="">
			<a href="http://www.rookierecruits.com/wp-admin/plugin-install.php">Plugin</a>
 
 
					</li>							</ul>
 
					</li>													
		<li id="wp-admin-bar-comments" class="">
			<a href="http://www.rookierecruits.com/wp-admin/edit-comments.php">Comments <span id='ab-awaiting-mod' class='pending-count'>2</span></a>
 
 
					</li>													
		<li id="wp-admin-bar-appearance" class="menupop">
			<a href="http://www.rookierecruits.com/wp-admin/themes.php"><span>Appearance</span></a>
 
						<ul>
 
		<li id="wp-admin-bar-themes" class="">
			<a href="http://www.rookierecruits.com/wp-admin/themes.php">Themes</a>
 
 
					</li>											
		<li id="wp-admin-bar-widgets" class="">
 
			<a href="http://www.rookierecruits.com/wp-admin/widgets.php">Widgets</a>
 
 
					</li>											
		<li id="wp-admin-bar-menus" class="">
			<a href="http://www.rookierecruits.com/wp-admin/nav-menus.php">Menus</a>
 
 
					</li>							</ul>
 
					</li>													
		<li id="wp-admin-bar-updates" class="">
 
			<a href="http://www.rookierecruits.com/wp-admin/update-core.php"><span title='1 Plugin Update'>Updates <span id='ab-updates' class='update-count'>1</span></span></a>
 
 
					</li>									</ul>
			</div>
 
			<div id="adminbarsearch-wrap">
				<form action="http://www.rookierecruits.com" method="get" id="adminbarsearch">
					<input class="adminbar-input" name="s" id="adminbar-search" type="text" value="" maxlength="150" />
 
					<input type="submit" class="adminbar-button" value="Search"/>
				</form>
			</div>
		</div>
 
		</body>
</html>
bond70 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 01/11/2011, 13h08   #4
Expert Confirmé
 
Avatar de javatwister
 
Homme
danseur
Inscription : août 2003
Messages : 2 667
Détails du profil
Informations personnelles :
Sexe : Homme
Localisation : France, Calvados (Basse Normandie)

Informations professionnelles :
Activité : danseur

Informations forums :
Inscription : août 2003
Messages : 2 667
Points : 3 035
Points : 3 035
après quelques corrections de ton html (demande si tu vois pas où étaient les problèmes) ça donne ça:

Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
 
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 
<title>...</title>
 
<style type="text/css">
 
</style>
 
</head>
<body>
 
 
<form  method="post" action="http://now.eloqua.com/e/f2.aspx" id="regform" onsubmit="return val(this.elements)">
 
<div>
   <input type="hidden" value="landing-page-whitepaper" name="elqFormName" />
   <input type="hidden" value="1584" name="elqSiteID" />
   <input type="hidden" value="" name="elqCustomerGUID" />
   <input type="hidden" value="0" name="elqCookieWrite" /><br />
 
   <label for="FirstName">First Name*</label><br />
   <input type="text" size="40" value="" name="FirstName" style="width: 275px;" class="elqField" id="FirstName" /><br />
 
   <label for="LastName">Last Name*</label><br />
   <input type="text" size="40" value="" name="LastName" style="width: 275px;" class="elqField" id="LastName" /><br />
 
   <label for="Company">Company*</label><br />
   <input type="text" size="40" value="" name="Company" style="width: 275px;" class="elqField" id="Company" /><br />
 
   <label for="EmailAddress">Email Address*</label><br />
   <input type="text" size="40" value="" name="EmailAddress" style="width: 275px;" class="elqField" id="EmailAddress" /><br /><br />
 
   <input type="submit" value="Submit" />
 
</div>
 
</form> 
 
 
<script type="text/javascript">
 
var mess=document.createElement('span');
mess.appendChild(document.createTextNode("ce champ est indispensable!"));
 
function val(ch){
 
	for(i=0;i<ch.length;i++){
		if(ch[i].type=="text" && ch[i].value.search(/\w/)==-1){
			ch[i].parentNode.insertBefore(mess,ch[i].nextSibling);
			return false
		}
	}
}
 
</script>
 
 
</body>
</html>

le test est sommaire, j'ai juste demandé qu'il y ait au moins un caractère alphanumérique par champ (à adapter);
seul le premier champ non renseigné est signalé;
javatwister est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 01/11/2011, 23h45   #5
Membre du Club
 
Avatar de bond70
 
Inscription : septembre 2008
Messages : 271
Détails du profil
Informations forums :
Inscription : septembre 2008
Messages : 271
Points : 45
Points : 45
Citation:
seul le premier champ non renseigné est signalé;
Très bien merci !

1)Savez-vous comment faire pour afficher l'erreur devant tous les champs non-remplis et pas seulement le premier ?

2)Enfin savez-vous comment formater le texte (par exemple le mettre en rouge) ?

MERCI !!!
bond70 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 02/11/2011, 09h25   #6
Expert Confirmé
 
Avatar de javatwister
 
Homme
danseur
Inscription : août 2003
Messages : 2 667
Détails du profil
Informations personnelles :
Sexe : Homme
Localisation : France, Calvados (Basse Normandie)

Informations professionnelles :
Activité : danseur

Informations forums :
Inscription : août 2003
Messages : 2 667
Points : 3 035
Points : 3 035
une 1ère solution: http://javatwist.imingo.net/test1.htm

d'autres sont envisageables (jouer sur visibility...)
en tout cas, vois la faq pour affiner tes tests (notamment pour le champ mail)
javatwister est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 03/11/2011, 23h22   #7
Membre du Club
 
Avatar de bond70
 
Inscription : septembre 2008
Messages : 271
Détails du profil
Informations forums :
Inscription : septembre 2008
Messages : 271
Points : 45
Points : 45
Merci ça marche nickel !!!!


bond70 est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité Cette discussion est résolue.
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 12h29.


 
 
 
 
Partenaires

Hébergement Web