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
|
public function fenetre()
{
echo "<script type='text/javascript'>
var myModale=new Modale(document.getElementById('back'),document.getElementById('Form'),document.getElementById('close'),document.getElementById('mod'));
myModale.create();
var email=new XmlRequest;
var pseudo=new XmlRequest;
var pwd=new XmlRequest;
function verif()
{
email.accord(document.getElementById('mail'));
pseudo.accord(document.getElementById('pseudo'));
pwd.accord(document.getElementById('pwd2'),document.getElementById('pwd1'));
if(document.getElementById('pwd2')!='' && document.getElementById('pwd1')!='')
{
if(document.getElementById('pseudo')!='' && getStyle('pseudo','borderColor')=='#00FF00')
{
if(document.getElementById('mail')!='' && getStyle('mail','borderColor')=='#00FF00')
{
if(document.getElementById('year')!='Y' && document.getElementById('month')!='M' && document.getElementById('day')!='J')
{
if(document.getElementById('nom')!='' && document.getElementById('prenom')!='')
{
document.getElementById('valider').style.disabled=false;
}
}
}
}
}
setTimeout(function(){verif()},200);
}
document.getElementById('alert').onclick=function()
{
alert(getStyle('pseudo','borderColor'));
}
verif();
function getStyle(el,styleProp)
{
var x = document.getElementById(el);
if (x.currentStyle!=null)
{
var y = x.currentStyle[styleProp];
}else if (window.getComputedStyle)
{
var y = document.defaultView.getComputedStyle(x,'').getPropertyValue(styleProp);
}
return y;
}
document.getElementById('close').onclick=function()
{
myModale.shut();
}
document.getElementById('mod').onclick=function()
{
myModale.fill();
}
</script>";
} |
Partager