/* VALIDATION CODE This code needs to be left into your contest to work properly. You may carefully edit lines below as needed. Please review comments on changing various options to make your contest work more to your specific needs. */ var form_id='139' /* if you want form validation page load also count as visit, comment out follow if statement */ if(document.URL.indexOf('invalid=')0){ err+=checkValue(f.q16,'re_email','Email address'); } f.q21.value=document.referrer; f.q23.value=document.URL; if(f.q101.value.length>0){ err+=checkValue(f.q101,'/^[0-9]{2}$/','Age'); } // to enable user entry email and postal code check, uncomment next three lines: // var postal=''; var fromEmail=getEv('Email_address'); if(err==''){ var sender=fromEmail.replace(/W/g,'_')+'_'+form_id; // to enable user entry email and postal code check, uncomment next line, comment out the line after: // if(document.URL.indexOf('invalid=captcha')<0 && getCookie(sender+postal)==form_id){ if(document.URL.indexOf('invalid=captcha')<0 && getCookie(sender)==form_id){ var el=getEl('form'+form_id); // Change the following line to document.location = '/path/xxx.html' to have this go to it's own page. el.innerHTML = 'Sorry - you have already filled out this form and cannot submit another entry.'; return false; } else { if(f.emails != undefined && f.emails.value.indexOf('@')-1){ var y=document.createElement('div') y.innerHTML=err.replace(/n/gi,'') alert(y.innerHTML.replace(//gi,'n')) } else { alert(err) } return false; } }
Beauty secrets
We want to know what your favourite beauty products are. Fill in our survey and you could see your picks in an upcoming issue of Chatelaine