<%-- 
    Document   : question_bank
    Created on : Feb 17, 2010, 4:05:36 PM
    Author     : Sreekanth
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
        <SCRIPT LANGUAGE="JavaScript">
          function fun()
          {
              //window.alert("sri");
                var uname=document.getElementById("uname").value;
             
		var password=document.getElementById("pword").value;
               
		if(uname==null || uname=="")
                    window.alert("please enter username");
		else 
		if(password==null || password=="")
                    {
		window.alert("please enter password");
       
                    }
		else 
                 {   
                    
                   if(uname=="sree" && password=="sree")
		   {
			//document.getElementById("fid").action="sview.jsp";
			//document.getElementById("fid").submit();
                        document.forms["f1"].submit();
		   }
                   else 
                   {
                      window.alert("please enter correct username and password"); 
                   }    
	         }
          }
          
       </SCRIPT>
       
       <style>
div
{
color:red;
width:180;
font-family:Comic Sans MS;
text-align:center;
}
a
{
text-decoration:none;
font-family:Comic Sans MS;
color:black;
cursor:hand;
}
input {border:5px;color:red;padding:2px;}

</style>  
   </head>
       <body background="images\bg.jpg" width="90%" scrolling="no">
       
       <table bgcolor="#ccccff" width=100% border=2>   
            <tr><td><img src="images\2.jpg" height="125" width="398px"></img></td>
                
                <td style="text-align:center; font-family:Comic Sans MS; font-size:45px; color:Maroon;"><b>Mechanical Questionnaire</b></td>
                
                <td><img src="images\rmirror2.jpg" height="125" width="398px"></img></td>
                </tr>
        </table>
        <pre>
            
            
            
            
            
        </pre>
        
        
        
        
     <% if(request.getAttribute("x")!=null)
                    out.println(request.getAttribute("x")); %>
    <div><center>LOGIN</center></div><br><br>
   <form name="f1" background="images\bg.jpg" action="question_bank.jsp" method="post">
   <center><table border="0">
<tr>
<td style="text-align:center; font-family:Comic Sans MS; font-size:20px; color:white;" ><b>User Name</b></td>

<td><input type="text" name="username" id="uname" size="12" /></td>

</tr>
<tr>
<td style="text-align:center; font-family:Comic Sans MS; font-size:25px; color:white;"><b>Password</b></td>

<td><input type="password" name="password" id="pword" size="12" /></td>
</tr>
</table></center>
<tr>
    
    <center><input type="button" value="Confirm" onclick="fun()" />

&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp<input type="reset" value="Cancel" name="reset" /></center>

</form>
</body>
</html>



        
