Autor Tema: [AYUDA] Email en formulario de contacto y newlester  (Leído 415 veces)

Desconectado TurkoDesigns

  • PHPerit@
  • *
  • Mensajes: 14
  • Karma: 0
  • Nuev@ PHPer@
    • Ver Perfil
[AYUDA] Email en formulario de contacto y newlester
« en: 24 de Mayo de 2013, 00:50:05 am »
Hola a todos, estoy editando un formulario de contacto que ya estaba creado, pero ando un poco perdido sobre donde tengo que colocar mi email para que me lleguen los correos, os dejo el codigo por aqui

Código: [Seleccionar]
//Setting trigger, content and dimensions of contact box overlay
$(".contactustrigger").colorbox({width:"470px", height:"630px", transition: 'none', speed:'50', inline:true, href:"#contactus"}).fadeIn(100);
$(".conemail").colorbox({width:"470px", height:"630px", transition: 'none', speed:'50', inline:true, href:"#contactus"}).fadeIn(100);
});
</script>

<script type="text/javascript">
//CONTACT US FORM
$(document).ready(function(){
//submittimg contact us form
$('.contactUsForm').submit( function(){
//validating the form
var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
var contactemail = document.getElementById('email-contactus');
if (!filter.test(contactemail.value)) { $('#email-contactus').css({background: '#f99', color: '#fff'}); } else {$('#email-contactus').css({background: '#fff', color: '#868686'});}
if (document.cform.name.value == "") { $('#name').css({background: '#f99', color: '#fff'}); } else {$('#name').css({background: '#fff', color: '#868686'});}
if (document.cform.message.value == "") { $('#message').css({background: '#f99', color: '#fff'}); } else {$('#message').css({background: '#fff', color: '#868686'});}
if ((document.cform.name.value == "") || (!filter.test(contactemail.value)) || (document.cform.message.value == "")){return false;}
if ((document.cform.name.value != "") && (filter.test(contactemail.value)) && (document.cform.message.value != "")) {
$('p.intro').css({background: 'none'});
$('p.intro').activity({segments: 8, steps: 5, opacity: 0.3, width: 5, space: 0, length: 7, color: '#0b0b0b', speed: 2});
//send ajax request
$.post('contactus.php',{
contactname:$('#name').val(),
contactemail:$('#email-contactus').val(),
message:$('#message').val()},
function(data){
$('p.intro').activity(false);
$('p.intro').css({background: 'url(img/envelope.png) no-repeat center', backgroundPosition: '0 -50px'});
});
//waits 2000, then closes the form and fades out
setTimeout('parent.$.fn.colorbox.close()', 2500);
//stay on the page
return false;
}
});
});
</script>

<script type="text/javascript">

Respecto al newlester me pasa lo mismo, quiero saber donde coloco mi correo para que cuando la gente le de a obtener actualizaciones me llegue un correo.

Código: [Seleccionar]
// NEWSLETTER SIGNUP FORM
$(document).ready(function(){
//submittimg contact us form
$('#newsletter-signup').submit( function(){
//validating the form
var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
var email = document.getElementById('email');
var name = document.getElementById('name');
if (!filter.test(email.value)) {$('#email').css({background: '#f77', color: '#fff'});} else {$('#email').css({background: '#fff', color: '#000'});}
if ( (!filter.test(email.value)) ){return false;}
if ( (filter.test(email.value)) ) {
$('.feedback').activity({segments: 8, steps: 5, opacity: 0.3, width: 3, space: 0, length: 4, color: '#0b0b0b', speed: 2});
//send ajax request
$.post('signup.php',{email:$('#email').val()},
//return data
function(data){
  $('.feedback').activity(false);
  $('.feedback').css({background: 'url(img/cheers.png) no-repeat', backgroundPosition: '15px 10px'});
document.getElementById("submit").disabled = true;
document.getElementById("email").disabled = true;
});
//stay on the page
return false;
}
  });
});
</script>

Comunidad PHPeros

[AYUDA] Email en formulario de contacto y newlester
« en: 24 de Mayo de 2013, 00:50:05 am »

Desconectado TurkoDesigns

  • PHPerit@
  • *
  • Mensajes: 14
  • Karma: 0
  • Nuev@ PHPer@
    • Ver Perfil
Re:[AYUDA] Email en formulario de contacto y newlester
« Respuesta #1 en: 25 de Mayo de 2013, 11:34:22 am »
Ya conseguí ambas cosas, podeis cerrrar tema, gracias