| |||||||
This is a discussion on Cool JavaScripts !! within the HTML/CSS/JavaScript section, part of the Programming category; Ever wonder what JavaScripts can do !! Check this out.. If you have some JavaScripts to share, just upload it ...
![]() |
|
| | LinkBack | Thread Tools | Display Modes |
|
#1
| ||||
| ||||
| Ever wonder what JavaScripts can do !! Check this out.. If you have some JavaScripts to share, just upload it here.
__________________ Would you like to Link To Us | Support TECH6 by going Premium Know more about me at Vinayaks.com | Follow TECH6 at Twitter |
|
#2
| ||||
| ||||
|
hai.. ![]() This small function can be used for client side email validation ... Code:
function echeck(str) {
var at="@"
var dot="."
var lat=str.indexOf(at)
var lstr=str.length
var ldot=str.indexOf(dot)
if (str.indexOf(at)==-1){
alert("Invalid E-mail ID")
return false
}
if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
alert("Invalid E-mail ID")
return false
}
if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
alert("Invalid E-mail ID")
return false
}
if (str.indexOf(at,(lat+1))!=-1){
alert("Invalid E-mail ID")
return false
}
if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
alert("Invalid E-mail ID")
return false
}
if (str.indexOf(dot,(lat+2))==-1){
alert("Invalid E-mail ID")
return false
}
if (str.indexOf(" ")!=-1){
alert("Invalid E-mail ID")
return false
}
return true
}
__________________ " There are no failures - just experiences and your reactions to them. New members Please read before u post General Tech6 Rules !!! CSS Validator | Markup Validator | RSS Validator |
|
#3
| ||||
| ||||
|
Spec_Tray, I looked for that script forever. I never could find it. Thanks
__________________ My iPhone is better than yours........... I Am Back! |
|
#4
| ||||
| ||||
|
glad to hear that iBlake....:thumbup1: Happy coding Spec_tray
__________________ " There are no failures - just experiences and your reactions to them. New members Please read before u post General Tech6 Rules !!! CSS Validator | Markup Validator | RSS Validator |
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |