Hi guys. I've been working on a javascript validation which uses Jquery. I dont know how JQuery works but it seem like the validation uses javascript. But when i use javascript to validate, the Jquery doesnt work. Okay, if you dont get what i mean, here it is the code:
[code]
var usr = $("#tbEmail");
var domelement = $(usr)[0];
var pattern = "^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$";
if(pattern, domelement){
[/code]
Is my IF statement correct? This code doesnt seem to work though. Any solution for this. If you need to see the entire javascript. Please do inform me because i dont want to dump all the codes here. Thanks!