944,141 Members | Top Members by Rank

Ad:
You are currently viewing page 1 of this multi-page discussion thread
Jan 12th, 2005
0

Simple JavavScript needs email validation

Expand Post »
I made a simple javascript code but I am having problems validating the email. I am simply lost on how to do this. Can anyone help me on this?

:rolleyes:
Reputation Points: 10
Solved Threads: 0
Newbie Poster
realtureal is offline Offline
5 posts
since Jan 2005
Jan 13th, 2005
0

Re: Simple JavavScript needs email validation

Quote originally posted by realtureal ...
I made a simple javascript code but I am having problems validating the email. I am simply lost on how to do this. Can anyone help me on this?

:rolleyes:
If anyone knows of an information form that I can use that has validation for email, that would be helpful also.

On this form I need name, company name, email fax, tel, country, state and questions. The only thing that I need is to make sure they done leave the email blank, a pop up to remind them to fill in their email.

Any help is appreciated, thanks
Reputation Points: 10
Solved Threads: 0
Newbie Poster
realtureal is offline Offline
5 posts
since Jan 2005
Jan 13th, 2005
0

Re: Simple JavavScript needs email validation

Post The Code, And I can help
Team Colleague
Reputation Points: 361
Solved Threads: 214
Taboo Programmer
Comatose is offline Offline
2,413 posts
since Dec 2004
Jan 14th, 2005
0

Re: Simple JavavScript needs email validation

Thanks, Here it is I think this is the right way to post it

<font size="3" color="#000000" face="Arial,Helvetica,sans-serif"><input type="hidden" name="tlx_SortOrder" value="Name,Your Email,State,Country,Comments">
<input type="hidden" name="tlx_FormIndex" value="2">
<input type="hidden" name="tlx_OKMessage" value="Thank you for your request for information. We will respond back to you in a timely manner. If you forgot or didn't enter a vailid email address please hit the arrow to resend with a vaild email address. we can't contact you if you don't give us a valid return address. Your email address will never be placed on any list or traded.">
<input type="hidden" name="tlx_SendMode" value="1">
<input type="hidden" name="tlx_Subject" value="Email form Turf website">
<input type="hidden" name="tlx_EmailTo" value="uas@uas-cropmaster.com">
</font>
<table cellpadding="0" cellspacing="1" border="0" align="center" width="454">
<tr>
<td align="left"> Name:<br>
<input type="text" name="FirstName" size="50" maxlength="100">
</td>
</tr>
<tr>
<td align="left" height="51">Your Email:<br>
<input type="text" name="Email" size="50" maxlength="100">
</td>
</tr>
<tr>
<td align="left">State:<br>
<input type="text" name="State" size="50" maxlength="100">
</td>
</tr>
<tr>
<td align="left">Country:<br>
<input type="text" name="country" size="50" maxlength="100">
</td>
</tr>
<tr>
<td align="left">Comments:<br>
<textarea name="Comments" rows="5" cols="100"></textarea>
</td>
</tr>
<tr>
<td align="right">
<input type="reset" name="reset">
<input type="submit" value="Send" name="tlx_send">
</td>
</tr>
</table>
Reputation Points: 10
Solved Threads: 0
Newbie Poster
realtureal is offline Offline
5 posts
since Jan 2005
Jan 14th, 2005
0

Re: Simple JavavScript needs email validation

http://www.aftermath.net/~coma/ex.html

Go There, Right Click on the page, and view source. That will give you all the code to do the javascript for validating the email (making sure the box is not empty, and it has an @ sign, etc). It also validates all the other fields, EXCEPT for the comments box... but you can just remove those if's and it will still work fine.
Team Colleague
Reputation Points: 361
Solved Threads: 214
Taboo Programmer
Comatose is offline Offline
2,413 posts
since Dec 2004
Jan 14th, 2005
0

Re: Simple JavavScript needs email validation

Thank you very much. My knowledge is real limited on forms. the previous form went through a third party to convert it into a email. I do not have the CGI option on my site. (to my knowledge) Do I activate this? Also can it be directed via a third party CGI hosting service? the one I build the form on was trelix and I still continued to use that link on this Form. Am I making any sense or do i need to contact my hosting company to set up properly? Sorry for my lack of knowledge.

Again I do thank you for the Script
Reputation Points: 10
Solved Threads: 0
Newbie Poster
realtureal is offline Offline
5 posts
since Jan 2005
Jan 15th, 2005
0

Re: Simple JavavScript needs email validation

However The Form i set up to set it up as email is the way to do it.... the thing is this: the form name (where it says <FORM NAME="datafrm"> MUST be in there for the javascript to work correctly. The thing is, it needs an ACTION so it knows who or what to contact with the information in the Form. Action should point to your 3rd party (most likely)
Team Colleague
Reputation Points: 361
Solved Threads: 214
Taboo Programmer
Comatose is offline Offline
2,413 posts
since Dec 2004
Jan 15th, 2005
0

Re: Simple JavavScript needs email validation

Thanks Again. I am understanding that third party mean a CGI hosting service? Or can third party mean my website? If it can be directed to my web site, then I need to have my CGI option activated. AM I CORRECT in understanding this?

Note: you are listed as a Junior techie and I am listed as a Junior techie....However your knowledge is far greater then mine, so you should be promoted or I should be Demoted. You help is greatly appreciated, thanks
Reputation Points: 10
Solved Threads: 0
Newbie Poster
realtureal is offline Offline
5 posts
since Jan 2005
Jan 15th, 2005
0

Re: Simple JavavScript needs email validation

Ok,

My question to you is this: when they click "submit" what is supposed to happen?


note: Thanks.
Team Colleague
Reputation Points: 361
Solved Threads: 214
Taboo Programmer
Comatose is offline Offline
2,413 posts
since Dec 2004
Jan 15th, 2005
0

Re: Simple JavavScript needs email validation

When They click "submit" the page is supposed to pass that information to another program. That program can be a CGI, it can be an ASP file, it can even be another web page. What You need to know, is to who or what that information is going to go to? Is it going to be sent as an e-mail to someone? If so, how is it going to get to him?
Team Colleague
Reputation Points: 361
Solved Threads: 214
Taboo Programmer
Comatose is offline Offline
2,413 posts
since Dec 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in JavaScript / DHTML / AJAX Forum Timeline: Javascript- On selection appear image..
Next Thread in JavaScript / DHTML / AJAX Forum Timeline: JavaScript Question





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC