udjamaflip
08-26-2008, 01:35 PM
http://udjamaflip.com/test.html is the url
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script type="text/javascript">
<!--
function validate_form ( )
{
valid = true;
if ( document.contact_form.name.value == "" )
{
alert ( "Please fill in the 'Your Name' box." );
valid = false;
}
return valid;
}
//-->
</script>
</head>
<body>
<form name="contact_form" method="post"action="test.html" onsubmit="return validate_form();">
name: <input type="text" name="name" />
<br />
age: <input type="text" name="age" />
<br /><br />
<input type="submit" value="submit" name="submit" />
</form>
</body>
</html>
Is the code
Anyone able to tell me whats wrong? it should be very basic and working :/
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script type="text/javascript">
<!--
function validate_form ( )
{
valid = true;
if ( document.contact_form.name.value == "" )
{
alert ( "Please fill in the 'Your Name' box." );
valid = false;
}
return valid;
}
//-->
</script>
</head>
<body>
<form name="contact_form" method="post"action="test.html" onsubmit="return validate_form();">
name: <input type="text" name="name" />
<br />
age: <input type="text" name="age" />
<br /><br />
<input type="submit" value="submit" name="submit" />
</form>
</body>
</html>
Is the code
Anyone able to tell me whats wrong? it should be very basic and working :/