GetDotted Domains

Viewing Thread:
"E-Mail Validation Script"

The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.

Wed 28/08/02 at 09:32
Regular
Posts: 787
I got my first form submitting this week but I still need to get an E-mail Vlidation script working. Here's the one I'm currently using:



Obviously I don't need to say the form should be called form1 ect. But it doesn't work at all. Can anybody spot what's wrong with it?
Thanks in advance
Rickoss
Sat 31/08/02 at 13:04
Posts: 0
Oops, remove the line which reads:

alert('You have submitted info: ' + myForm.txt2.value.indexOf('.'));
Sat 31/08/02 at 13:02
Posts: 0
OK, this script works, change yours as appropriate:

--------------



...
--------------

You should also remove the 'onClick' action from your submit button. I would recommend however trying a different, more powerful email address validator. There is a JavaScript one at:

http://javascript.internet.com/ forms/email-validation---basic.html [spaces]

Ideally however you should use a server side script (e.g. PHP) since someone can get around the validation by turning of JavaScript....
Sat 31/08/02 at 12:19
Regular
Posts: 10,437
Ok. The address is http://membres.lycos.fr/rickoss/test.php The code is already on there.

Cheers.
Sat 31/08/02 at 10:38
Posts: 0
RiCkOsS wrote:
> Damn it, can't be bothered with this validation script, nothing seems
> to work. I thought that PHP one would but I don't know how to call
> alert() functions on PHP. :\

PHP is server side, JavaScript is client side. You need a client side script to load an alert. If you upload the page with the JavaScript you have got, I will have a look and tell you what is wrong....
Fri 30/08/02 at 10:32
Regular
Posts: 10,437
Oh, you mean the one you sent me first of all? I was meaning the one I posted futher down the thread. It's simple, that's why I wanted to use it really. Doesn't really matter about an E-Mail Validation script, i'll stick with deleting e-mails :-)
Thu 29/08/02 at 22:38
Regular
"It goes so quickly"
Posts: 4,083
Didn't the one I sent you work??? I thought you said it did?
Thu 29/08/02 at 21:08
Regular
Posts: 10,437
Damn it, can't be bothered with this validation script, nothing seems to work. I thought that PHP one would but I don't know how to call alert() functions on PHP. :\
Thu 29/08/02 at 20:59
Regular
Posts: 10,437
Heh, i was supposed to pu "." not "@" :-D

Cheers
Thu 29/08/02 at 19:34
Regular
"It goes so quickly"
Posts: 4,083
You've got that one twice for some reason:


if(document.form1.txt2.indexOf("@")== -1){
alert('Invalid E-Mail Address \n Please Retry')
return false;
}


Delete one and see if its any better.
Thu 29/08/02 at 19:22
Regular
Posts: 10,437
Hmmmm, isn't working. Here's the script i'm using:

HTML:





JavaScript:

Freeola & GetDotted are rated 5 Stars

Check out some of our customer reviews below:

Unrivalled services
Freeola has to be one of, if not the best, ISP around as the services they offer seem unrivalled.
Simple, yet effective...
This is perfect, so simple yet effective, couldnt believe that I could build a web site, have alrealdy recommended you to friends. Brilliant.
Con

View More Reviews

Need some help? Give us a call on 01376 55 60 60

Go to Support Centre

It appears you are using an old browser, as such, some parts of the Freeola and Getdotted site will not work as intended. Using the latest version of your browser, or another browser such as Google Chrome, Mozilla Firefox, or Opera will provide a better, safer browsing experience for you.