| | |
Simple JavavScript needs email validation
Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Jan 2005
Posts: 5
Reputation:
Solved Threads: 0
•
•
•
•
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:
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
•
•
Join Date: Jan 2005
Posts: 5
Reputation:
Solved Threads: 0
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>
<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>
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.
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.
•
•
Join Date: Jan 2005
Posts: 5
Reputation:
Solved Threads: 0
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
Again I do thank you for the Script
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)
•
•
Join Date: Jan 2005
Posts: 5
Reputation:
Solved Threads: 0
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
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 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?
![]() |
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: Javascript- On selection appear image..
- Next Thread: JavaScript Question
| Thread Tools | Search this Thread |
acid2 ajax ajaxcode ajaxexample ajaxhelp ajaxjspservlets animate automatically beta box browser bug calendar captchaformproblem checkbox child close column createrange() css cursor decimal dependent design disablefirebug dom download dropdown editor element embed engine error events explorer ext file form forms google gwt gxt hiddenvalue highlightedword hint html htmlform ie8 iframe images index internet java javascript javascripthelp2020 jawascriptruntimeerror jquery jsf jsfile jump libcurl listbox math media microsoft mimic mp4 object onmouseoutdivproblem onmouseover onreadystatechange parent paypal pdf php player post problem progressbar regex runtime scroll search security select shopping size software sql text textarea unicode w3c web website window windowofwords windowsxp wysiwyg \n






