I've got this code from some one and as a beginner i'm wondering if anyone can help me understand the variable isEmail... i'm mainly unsure about the forward and backward slash...
function CheckEmail(f) {
var isEmail = /(a-z@([a-z.])([.][a-z]{3})$)|(a-z@([a-z.]*)(.[a-z]{3})(.[a-z]{2})*$)/i;
i also need help in validating the phone number in a form... at the moment i've got..
function CheckPhone(f) {
var isPhone = new Array(/([1-9]\d{2})/,/([1-9]\d{2})/,/([1-9]\d{3})/);
for (var p=0; p<f.phone.length; ++p) {
if (!isPhone[p].test(f.phone[p].value)) {
how would i change the var to get the form to ensure users must enter 4 digit (for the area code) then space then 7 digit.
i'm a real beginner and it would be very grateful if anyone could help... you see i'm in the second year of this degree and i've got to hand this assignment in this friday... ooops...
Thanx
ectria