Show
Ignore:
Timestamp:
09/13/07 14:13:04 (15 months ago)
Author:
aarkerio
Message:

Update

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/app/views/newsletters/subscribe.thtml

    r101 r103  
    5151{  
    5252  var email  = document.getElementById("SubscribersEmail"); 
    53   alert('I am here'); 
     53  //alert('I am here'); 
    5454   
    5555  if (email.value.length < 3) 
     
    6060  } 
    6161 
     62  //check email 
     63  var atpos  = email.value.indexOf("@");    //indexOf find something in your JavaScript string 
     64  var dotpos = email.value.indexOf("."); 
     65   
     66  //alert('at: ' + atpos); 
     67   
     68  if ( atpos < 1 || dotpos < 1 || email.value.length < 5)  
     69  { 
     70    alert('Mmmm, this email ' + email.value + ' does not look as a valid email'); 
     71    email.focus(); 
     72    return false; 
     73  } 
     74  // everytihing looks ok, so send the form 
    6275  return true; 
    6376}