List Info

Thread: Someone bypassed my code




Someone bypassed my code
user name
2006-01-12 19:07:02
Someone managed to send me an empty e-mail(no e-mail, name
etcc) from my form
page, where there is a check form code below.
How to prevent that from happening?
http://ranabtawi.com
/rates.shtml

Code:
<script language="JavaScript"
type="text/JavaScript">
<!--
function checkForm() {

if (document.form.name.value == "") 
	{
    alert( "Please enter your name." );
    document.form.name.focus();
    return false ;
  }
if (document.form.email.value.indexOf("")
== -1 ||
			document.form.email.value == "" ||
   document.form.email.value.indexOf(".") == -1) 
		{
   alert("Please input your e-mail address!");
   document.form.email.focus();
		return false;
		}
	
	
return true;
}
//-->
</script>



Thanks



[Non-text portions of this message have been removed]



For a quick response, your message should include,
 
- A copy of the code
- A copy of any error messages
- A description of what you're trying to achieve
- A description of what's actually happening
http://www.trans4mind.com/personal_developmen
t/HTMLGuide/index.html  For HTML
http://www.trans4mind.com/personal_developme
nt/JavaScript/index.html For JavaScript
You can also download the JavaScript and HTML tutorials
(Nearly 2.5 megabytes.)
A 30 day version of jsEditor is available for free download
at
http://www.trans4mind.com/personal_devel
opment/JavaScript/freeEditor.htm
--------------------------
FREE zip/unzip program:
http://www.trans4mind.com/personal_development/z
ipper/index.html
--------------------------OR go to and change your settings:
http://g
roups.yahoo.com/group/1stJavaScript/
List owner:  1stJavaScript-owner@yahoogroups.com 


://groups.yahoo.com/group/1stJavaScript/
List owner:  1stJavaScript-owner@yahoogroups.com 


 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://g
roups.yahoo.com/group/1stJavaScript/

<*> To unsubscribe from this group, send an email to:
    1stJavaScript-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.c
om/info/terms/
 


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )