Created
March 3, 2017 13:39
-
-
Save matthewtrask/1858f174252bc53c66b891175fa72a93 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Dog Object</title> | |
<script type="text/javascript" src="validator.js"></script> | |
<style type="text/css"> | |
#JS { | |
display:none; | |
} | |
</style> | |
<script> | |
function checkJS(){ | |
document.getElementById('JS').style.display = 'inline'; | |
} | |
</script> | |
</head> | |
<body onload="checkJS();"> | |
<h1>Dog Object Creater</h1> | |
<div id="JS"> | |
<form action="lab.php" method="post" onsubmit="return validate_input(this);"> | |
<h2>Please complete All fields. Please note the required format of information</h2> | |
Your Dog's Name(max 20 characters, alphabetic) | |
<input type="text" name="dog_name" id="dog_name" pattern="[a-zA-Z]*" title="Up to 20 Alphabetic Characters" maxlength="20" /> | |
<br /> | |
Your Dog's Breed (max 35 characters, alphabetic) | |
<input type="text" name="dog_breed" id="dog_breed" pattern="[a-zA-Z]*" title="Up to 35 Alphabetic Characters" maxlength="35" /> | |
<br /> | |
Your Dog's Color (max 15 characters, alphabetic) | |
<input type="text" name="dog_color" id="dog_color" pattern="[a-zA-Z]*" title="Up to 15 Alphabetic Characters" maxlength="15"> | |
<br /> | |
Your Dog's Weight (numeric only) | |
<input type="number" name="dog_weight" id="dog_weight" title="Up to 15 Alphabetic Characters" min="1" max="120"> | |
<br /> | |
Your Dog's Gender(Male or Female) | |
<input type="text" name="dog_gender" id="dog_gender" pattern="[a-zA-Z]*" title="Enter Male or Female" maxlength="6"> | |
<br /> | |
<input type="submit" value="Click to create your dog" /> | |
</form> | |
</div> | |
<noscript> | |
<div id="noJS"> | |
<form class="" action="lab.php" method="post"> | |
<h2>Please complete All fields. Please note the required format of information</h2> | |
Your Dog's Name(max 20 characters, alphabetic) | |
<input type="text" name="dog_name" id="dog_name" pattern="[a-zA-Z]*" title="Up to 20 Alphabetic Characters" maxlength="20" /> | |
<br /> | |
Your Dog's Breed (max 35 characters, alphabetic) | |
<input type="text" name="dog_breed" id="dog_breed" pattern="[a-zA-Z]*" title="Up to 35 Alphabetic Characters" maxlength="35" /> | |
<br /> | |
Your Dog's Color (max 15 characters, alphabetic) | |
<input type="text" name="dog_color" id="dog_color" pattern="[a-zA-Z]*" title="Up to 15 Alphabetic Characters" maxlength="15"> | |
<br /> | |
Your Dog's Weight (numeric only) | |
<input type="number" name="dog_weight" id="dog_weight" title="Up to 15 Alphabetic Characters" min="1" max="120"> | |
<br /> | |
<input type="submit" onclick="validateForm()" value="Click to create your dog" /> | |
</form> | |
</div> | |
</noscript> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment