Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <script>
- function validateUserForm() {
- var userSearchTerm=document.forms.["searchBox"]["searchTerm"];
- if (userSearchTerm.value == "")
- {
- window.alert("You have entered a blank value. Please enter a-z or A-Z");
- return false;
- }
- document.getElementById("searchBox").submit();
- }
- </script>
- <title>Search</title>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <link rel="stylesheet" type="text/css" href="style.css"/>
- </head>
- <body>
- <form name="searchBox" action="search2.php" onsubmit="return validateUserForm()" method="POST">
- Enter your desired letter to search for here:<input type="text" name="searchTerm">
- <input type="submit" value="submit" name="submit">
- </form>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement