function loadForm(form){ String.prototype.sansAccent = function(){ var accent = [ /[\300-\306]/g, /[\340-\346]/g, // A, a /[\310-\313]/g, /[\350-\353]/g, // E, e /[\314-\317]/g, /[\354-\357]/g, // I, i /[\322-\330]/g, /[\362-\370]/g, // O, o /[\331-\334]/g, /[\371-\374]/g, // U, u /[\321]/g, /[\361]/g, // N, n /[\307]/g, /[\347]/g, // C, c ]; var noaccent = ['A','a','E','e','I','i','O','o','U','u','N','n','C','c']; var str = this; for(var i = 0; i < accent.length; i++){ str = str.replace(accent[i], noaccent[i]); } return str; } String.prototype.sansCaractereSpeciaux = function(){ var caractereSpeciaux = [ '%', '!', '@', '+', '=',]; var vide = ['', '', '', '', '']; var str = this; for(var i = 0; i < caractereSpeciaux.length; i++){ str = str.replace(caractereSpeciaux[i], vide[i]); } return str; } if(form=="FormStart1"){ function truc() { alert("The form was submitted"); }; var html = '
' + ' ' + '
' + '
'+ '
'+ '' + '
'+ '
'+ '' + '
'+ '
'+ '
' + '
'+ ' ' + '
'+ '
' + '
' + '
'+ ' Entrez un numéro valide car vous recevrez un code
de confirmation pour poursuivre

' + ' ' + '
'+ '
' + '
' + ' ' + '
'; new $.flavr({ title : 'INSCRIPTION - 1/4', content : 'Merci de remplir le formulaire ci-dessous', dialog : 'form', closeOverlay : false, closeEsc : false, iconPath : '/web/js/jQuery/flavr/flavr/images/icons/', icon : 'email.png', form : { content: html, method: 'post' } }); } if(form=="FormVerifMobile"){ var html = '
' + ' ' + ' ' + ' ' + '
' + '
' + ' ' + '
'; new $.flavr({ title : 'V\u00C9RIFICATION DE VOTRE NUM\u00C9RO', content : '', dialog : 'form', closeOverlay : false, closeEsc : false, iconPath : '/web/js/jQuery/flavr/flavr/images/icons/', icon : 'password.png', form : { content: html, method: 'post' } }); } if(form=="FormStart2"){ var html = '
' + ' ' + ' ' + '
' + '
' + ' ' + ' ' + ' ' + '
' + '
' + ' ' + '
'; //creates a listener for when you press a key jQuery(function($) { $("#nomAgence").on('keyup', function() { var inputTextValue = $("#nomAgence").val(); //FORMATAGE DU NOM inputTextValue = inputTextValue.replace(/ /g,"").toLowerCase(); inputTextValue = inputTextValue.replace("'",""); inputTextValue = inputTextValue.sansAccent(); inputTextValue = inputTextValue.sansCaractereSpeciaux(); inputTextValue = inputTextValue.trim(); //listens for you to press the ENTER key, at which point your web address will change to the one you have input in the search box $('#ssDom0').val("http://"+inputTextValue+".agence.ovh"); $('#ssDom').val(inputTextValue+".agence.ovh"); }); }); new $.flavr({ title : 'INSCRIPTION - 2/4', content : '______________________________', dialog : 'form', closeOverlay : false, closeEsc : true, iconPath : '/web/js/jQuery/flavr/flavr/images/icons/', icon : 'email.png', form : { content: html, action: 'start.do', method: 'post' } }); } }