<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>

<html>
<head><title>Add Article</title></head>
<script language="JavaScript">
function Validate(){
  var articleid =document.getElementById("articleid").value;  
  if(articleid=="" || articleid.length<1){	 
	  alert( "Please enter article id." );
	  document.getElementById("articleid").focus();
	  return false;
   }
  
  if ( isNaN( articleid ) ){
	  alert( "Please enter a valid article id." );
	  return false;
   }
  return true;
 }
</script>
<body>
<h1 align="center">Search Article</h1>
<hr width=500 >
<c:url var="viewArticlesUrl" value="/articles.html" />
<br />
<br />
<c:url var="saveArticleUrl" value="/articles/save.html" />
<form:form modelAttribute="article" method="POST" action="searcharticle.html" onsubmit="return Validate();">
     <table align="center">
       <tr>
         <td><form:label path="articleId">Article Id:</form:label></td>
         <td><form:input path="articleId" id="articleid" /></td>
         <form:errors path="articleId" > </form:errors>         
       </tr>       
       <tr>
         <td></td>
         <td><input type="submit" value="Search" /></td>         
       </tr>      
     </table>
     <br/>	
</form:form>
</body>
</html>