Segueix-nos
Vols rebre el Singular?
function _cii1322checkForm(){ var ok = true; var erMail = /^[\w\-\.]+\@[\w\.-]+\.[a-z]{2,4}$/i; if (document.getElementById("name_cii1322").value == "") { ok = false; document.getElementById("error_name_cii1322").innerHTML = "Has d'introducir el teu nom"; document.getElementById("label_name_cii1322").className = "form_item_ko"; } else { document.getElementById("error_name_cii1322").innerHTML = ""; document.getElementById("label_name_cii1322").className = "form_item"; } if (document.getElementById("from_email_cii1322").value == "") { ok = false; document.getElementById("error_from_email_cii1322").innerHTML = "Ha d'indicar el seu correu electrònic."; document.getElementById("label_from_email_cii1322").className = "form_item_ko"; } else if(erMail.test(document.getElementById("from_email_cii1322").value) == false){ ok = false; document.getElementById("error_from_email_cii1322").innerHTML = "Has d'indicar una adreça de correu vàlida"; document.getElementById("label_from_email_cii1322").className = "form_item_ko"; } else { document.getElementById("error_from_email_cii1322").innerHTML = ""; document.getElementById("label_from_email_cii1322").className = "form_item"; } if (document.getElementById("email_cii1322").value == "") { ok = false; document.getElementById("error_email_cii1322").innerHTML = "Ha d'indicar el correu electr&ograve;nic al que va dirigit."; document.getElementById("label_email_cii1322").className = "form_item_ko"; } else { var mails = document.getElementById("email_cii1322").value; var mailsOk = true; if(mails.indexOf(',') >= 0){ var mail, i; mails = mails.split(','); for(i = 0; (i < mails.length) && mailsOk; i++){ mail = mails[i]; mail = mail.replace(/\s/g, ''); if(erMail.test(mail) == false) mailsOk = false; } } else if(erMail.test(mails) == false) mailsOk = false; if(!mailsOk){ ok = false; document.getElementById("error_email_cii1322").innerHTML = "Has d'indicar una adreça de correu vàlida"; document.getElementById("label_email_cii1322").className = "form_item_ko"; } else { document.getElementById("error_email_cii1322").innerHTML = ""; document.getElementById("label_email_cii1322").className = "form_item"; } } if (document.getElementById("notes_cii1322").value == "") { ok = false; document.getElementById("error_notes_cii1322").innerHTML = "Escriu el teu comentari"; document.getElementById("label_notes_cii1322").className = "form_item_ko"; } else { document.getElementById("error_notes_cii1322").innerHTML = ""; document.getElementById("label_notes_cii1322").className = "form_item"; } return ok; } function _cii1322sendFormAjax(){ var value, params = 'IDN=79956&submit_cii1322=1'; if(document.getElementById("name_cii1322")){ value = document.getElementById("name_cii1322").value; params += '&name_cii1322='+value.replace(/\n/gi, ""); } if(document.getElementById("from_email_cii1322")){ value = document.getElementById("from_email_cii1322").value; params += '&from_email_cii1322='+value.replace(/\n/gi, ""); } if(document.getElementById("email_cii1322")){ value = document.getElementById("email_cii1322").value; params += '&email_cii1322='+value.replace(/\n/gi, ""); } if(document.getElementById("notes_cii1322")){ value = document.getElementById("notes_cii1322").value; params += '&notes_cii1322='+value.replace(/\n/gi, "
"); } params = params.replace(/\?/gi, "%3F"); var ajax = new Ajax.Updater ( '', '', {parameters: params} ); }
Envia la notícia
Si escrius més d'un correu electrňnic, separa'ls per una coma
* Camps obligatoris