Overblog Suivre ce blog
Editer la page Administration Créer mon blog

Foot Mag

100% foot

Abonnement Newsletter

<div class="box newsletter box2">

<div class="box-titre">

<h2>

<span>Abonnez-vous gratuitement à FootMag en inscrivant votre eMail !</span>

</h2>

</div>

<div class="box-content">

Inscription &agrave; la newsletter

<form action="http://ann.over-blog.com/blog-newsletter.php?ref=2253556" name="newsletter_form_10260" method="post" class="cleansize" id="newsletter_form_10260">

<fieldset>

<legend>

<p class="error" style="display: none;">Une erreur s'est produite. Veuillez r&eacute;&eacute;ssayer plus tard.</p>

<input name="email" id="newsletter_email_10260" value="Votre eMail et appuyez sur Entrée" type="text" class="checkMail notNull" />

</legend></fieldset>

<fieldset class="extends" style="display: none;">

<legend>

<ul>

<li>

<label>

<input type="checkbox" name="alert" value="1" id="alert" checked="checked" />

Notifications de publication d'articles

</label>

</li>

<li>

<label>

<input type="checkbox" name="newsletter" value="1" id="newsletter" checked="checked" />

Newsletters du blog

</label>

</li>

<li>

<span class="ob-button orange">

<span class="first-child">

<input value="OK" type="submit" />

</span>

</span>

</li>

</ul>

</legend></fieldset>

</form>

<script charset="utf-8" type="text/javascript">// <![CDATA[

1

2

3

//<![CDATA[

(function() { var f = YAHOO.util.Dom.get( 'newsletter_form_10260' ); YAHOO.util.Dom.setStyle( YAHOO.util.Dom.getElementsByClassName( 'extends', 'fieldset', f ), 'display', 'none' ); YAHOO.util.Event.on( f.email, 'focus', function(e) { if (this.value == 'Votre eMail') { this.value = ''; } this.className = ''; var extendPan = YAHOO.util.Dom.getElementsByClassName( 'extends', 'fieldset', f )[0]; if (YAHOO.util.Dom.getStyle( extendPan, 'display' ) == 'none') {  YAHOO.util.Dom.setStyle( extendPan, 'visibilty', 'hidden' ); YAHOO.util.Dom.setStyle( extendPan, 'display', 'block' ); var reg = YAHOO.util.Dom.getRegion( extendPan ); extendPan.fullHeight = reg.bottom - reg.top; YAHOO.util.Dom.setStyle( extendPan, 'height', 0 ); YAHOO.util.Dom.setStyle( extendPan, 'visibilty', 'visible' ); (new YAHOO.util.Anim( extendPan, { height: { to: extendPan.fullHeight } }, 0.25, YAHOO.util.Easing.EaseOut )).animate(); } } ); YAHOO.util.Event.on( [f.alert,f.newsletter], 'click', function(e) { YAHOO.util.Dom.removeClass( [this.form.alert.parentNode, this.form.newsletter.parentNode], 'err' ); } ); YAHOO.util.Event.on( f, 'submit', function(e) { YAHOO.util.Event.preventDefault(e); var isOk = true; if (!this.email.value.match( /^((([a-z]|[A-Z]|[0-9]|!|#|$|%|&|'|\*|\+|\-|\/|=|\?|\^|_|`|\{|\||\}|~)+(\.([a-z]|[A-Z]|[0-9]|!|#|$|%|&|'|\*|\+|\-|\/|=|\?|\^|_|`|\{|\||\}|~)+)*)@((((([a-z]|[0-9])([a-z]|[0-9]|\-){0,61}([a-z]|[0-9])\.))*([a-z]|[0-9])([a-z]|[0-9]|\-){0,61}([a-z]|[0-9])\.)[\w]{2,4}|(((([0-9]){1,3}\.){3}([0-9]){1,3}))|(\[((([0-9]){1,3}\.){3}([0-9]){1,3})\])))$/ )) { isOk = false; this.email.className = 'err'; } if (!this.alert.checked && !this.newsletter.checked) { YAHOO.util.Dom.addClass( [this.alert.parentNode, this.newsletter.parentNode], 'err' ); isOk = false; } if (isOk) {  var extendPan = YAHOO.util.Dom.getElementsByClassName( 'extends', 'fieldset', this )[0]; if (!extendPan.waitpan) { extendPan.waitpan = document.createElement('div'); extendPan.appendChild( extendPan.waitpan ); extendPan.waitpan.style.display = 'none'; extendPan.displayMessage = function(msg) { if (this.waitpan.style.display != 'none') { var a = new YAHOO.util.Anim( this, { height: { to: 0 } }, 0.25, YAHOO.util.Easing.EaseOut ); a.onComplete.subscribe( function(a, e, msg) { this.showMessage(msg); }, msg, this ); a.animate(); } else { this.showMessage(msg); } }; extendPan.showMessage = function(msg) { this.waitpan.innerHTML = msg; var a = new YAHOO.util.Anim( this, { height: { to: 0 } }, 0.25, YAHOO.util.Easing.EaseOut ); a.onComplete.subscribe( function(e, obj) { YAHOO.util.Dom.batch( YAHOO.util.Dom.getChildren( extendPan ), function(el) { if (el != el.parentNode.waitpan) { YAHOO.util.Dom.setStyle( el, 'display', 'none' ); } else { YAHOO.util.Dom.setStyle( el, 'display', '' ); } } ); (new YAHOO.util.Anim( extendPan, { height: { to: this.fullHeight } }, 0.25, YAHOO.util.Easing.EaseOut )).animate(); }, this, true ); a.animate(); }; extendPan.hideMessage = function() { var a = new YAHOO.util.Anim( this, { height: { to: 0 } }, 0.25, YAHOO.util.Easing.EaseOut ); a.onComplete.subscribe( function(e, obj) { YAHOO.util.Dom.batch( YAHOO.util.Dom.getChildren( this ), function(el) { if (el != el.parentNode.waitpan) { YAHOO.util.Dom.setStyle( el, 'display', '' ); } else { YAHOO.util.Dom.setStyle( el, 'display', 'none' ); } } ); (new YAHOO.util.Anim( this, { height: { to: this.fullHeight } }, 0.25, YAHOO.util.Easing.EaseOut )).animate(); }, this, true ); a.animate(); }; } extendPan.displayMessage( '…' ); YAHOO.util.Connect.setForm(this); YAHOO.util.Connect.asyncRequest( 'post', "/blog-newsletter.php?ref=2253556&text=1", { success: function(o) { eval('var output = ' + o.responseText); var msg = null; if (output.ok) {  msg = 'Votre inscription a bien été prise en compte. Un mail vient de vous être envoyé afin de la confirmer.'; } else if (output.errors) {   for (i in output.errors) { if (i == 'empty') { YAHOO.util.Dom.addClass( [this.alert.parentNode, this.newsletter.parentNode], 'err' ); } else { YAHOO.util.Dom.addClass( this[i], 'err' ); } } } else {  msg = 'Une erreur s\'est produite. Veuillez rééssayer plus tard.'; } if (msg) {  var extendPan = YAHOO.util.Dom.getElementsByClassName( 'extends', 'fieldset', this )[0]; extendPan.displayMessage( '<p>' + msg + '</p>' ); YAHOO.util.Event.on( extendPan, 'click', function() { this.hideMessage(); YAHOO.util.Event.purgeElement( this ); } ); } }, scope: this } ); } } ); })();

// ]]></script>

</div>

<div class="box-footer">

<h2>

<span>

</span></h2>

</div>

</div>

Archives

Articles récents