Results 1 to 7 of 7

Thread: Jsp:add student

  1. #1
    mamtha is offline Member
    Join Date
    Jan 2012
    Posts
    10
    Rep Power
    0

    Default Jsp:add student

    <%@ page language="java" import="java.sql.*" %>
    <%@ page import="com.dao.*" %>

    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

    <html>

    <head>
    <title>Nsep</title>

    <link rel="stylesheet" href="../css/styllensep.css" type="text/css" />
    <script type="text/javascript">
    window.history.forward();
    function noBack()
    {
    window.history.forward();
    }
    setTimeout("noBack()", 0);



    function msg()
    {var ret=0;
    var ide=0;
    var sid=document.cal.sid.value;
    if(sid=="")
    {
    document.getElementById("error1").innerHTML="*Ente r Student's ID"
    document.cal.sid.focus();
    ide=1;
    ret=ret+1;
    }
    if(sid!="")
    {
    if(isNaN(sid))
    {
    document.getElementById("error1").innerHTML="*Stud ent's ID number should be in integers"
    document.cal.sid.focus();
    ide=1;
    ret=ret+1;
    }

    if(sid.length<6)
    {
    document.getElementById("error1").innerHTML="*Stud ent's ID should be in integers and exactly 6 digits"
    document.cal.sid.focus();ide=1;
    ret=ret+1;
    }
    }
    if(ide==0)
    {
    document.getElementById("error1").innerHTML=""
    }



    var ac=0;
    var bb=document.cal.sname.value;

    if(bb==""||bb==0)
    {
    document.getElementById("error2").innerHTML="*Ente r the Student Name"
    document.cal.sname.focus();
    ac=1;
    ret=ret+1;
    }

    var a=' ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwx yz';
    for(j=0;j<bb.length;j++)

    {

    if(a.indexOf(bb.charAt(j))<0)

    {

    document.getElementById("error2").innerHTML="*Stud ent Name Should not contain Intergers or Special characters"
    ac=1;
    document.cal.sname.focus();
    ret=ret+1;
    }


    }

    if(ac==0)
    {
    document.getElementById("error2").innerHTML=""
    }



    var rr=0;
    var c='0123456789';
    var b1=document.cal.sage.value;
    if(b1=="" || b1.length!=2)
    {
    rr=1;
    document.getElementById("error3").innerHTML="*age cannot be empty and should be of 2 digits.";
    document.cal.sage.focus();
    ret=ret+1;
    }
    for(j=0;j<b1.length;j++)
    {
    if(c.indexOf(b1.charAt(j))<0)
    {
    rr=1;
    document.getElementById("error3").innerHTML="*Ente r a vaild age";
    document.cal.sage.focus();
    ret=ret+1;
    }
    }
    if(rr==0)
    {
    document.getElementById("error3").innerHTML="";

    }






    var ad=0;
    var bc=document.cal.sphn.value;

    if(bc=="")
    {
    document.getElementById("error4").innerHTML="*Ente r Student's Contact Number"
    document.cal.sphn.focus();
    ad=1;
    ret=ret+1;
    }
    else if(bc<7000000000){
    document.getElementById("error4").innerHTML="*Ente r Valid Contact Number"
    document.cal.sphn.focus();
    ad=1;
    ret=ret+1;
    }
    if(bc!="")
    {
    if(isNaN(bc))
    {
    document.getElementById("error4").innerHTML="*Stud ent's contact number should be in integers"
    document.cal.sphn.focus();
    ad=1;
    ret=ret+1;
    }

    if(bc.length<10)
    {
    document.getElementById("error4").innerHTML="*Stud ent's contact Number should be in integers and exactly 10 digits"
    document.cal.sphn.focus();ad=1;
    ret=ret+1;
    }
    }
    if(ad==0)
    {
    document.getElementById("error4").innerHTML="";
    }



    var g=0;

    var b3=document.cal.saddr.value;
    if(b3=="" || b3.length<20)
    {

    var g=1;
    document.getElementById("error5").innerHTML="*Addr ess should be more than 20 characters";
    document.cal.saddr.focus();
    ret=ret+1;
    }
    else
    {

    document.getElementById("error5").innerHTML="";
    }




    var m=0;
    var bb=document.cal.sloc.value;

    if(bb==""||bb==0)
    {
    document.getElementById("error6").innerHTML="*Ente r the Location"
    document.cal.sloc.focus();
    m=1;
    ret=ret+1;
    }
    var a=' ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwx yz';
    for(j=0;j<bb.length;j++)

    {

    if(a.indexOf(bb.charAt(j))<0)

    {

    document.getElementById("error6").innerHTML="*Loca tion Should not contain Intergers or Special characters"
    ac=1;
    document.cal.sloc.focus();
    ret=ret+1;
    }


    }

    if(m==0)
    {
    document.getElementById("error6").innerHTML="";
    }












    var r=0;
    var z=document.cal.scoll.value;
    if(z=="ch2")
    {
    r=1;
    document.getElementById("error7").innerHTML="*Sele ct College";
    ret=ret+1;
    }
    else
    {
    document.getElementById("error7").innerHTML="";

    }



    var f=0;
    var z=document.cal.syr;
    if(z.selectedIndex ==0)
    {
    f=1;
    document.getElementById("error8").innerHTML="*Sele ct Year";
    ret=ret+1;
    }
    else
    {
    document.getElementById("error8").innerHTML="";

    }



    var h=0;
    var z=document.cal.scom;
    if(z.selectedIndex ==0)
    {
    h=1;
    document.getElementById("error9").innerHTML="*Sele ct commited amount";
    ret=ret+1;
    }
    else
    {
    document.getElementById("error9").innerHTML="";

    }

    var pw=0;
    var sspwd=document.cal.spwd.value;
    if(sspwd=="")
    {
    document.getElementById("error10").innerHTML="*Ent er Password"
    document.cal.sid.focus();
    pw=1;
    ret=ret+1;
    }

    if(ret!=0)
    {
    return false;
    }
    }

    </script>
    </head>
    <body onload="noBack()">
    <div id="logo">
    </div>
    <div id="back">
    </div>


    <div id="sidenav">

    <p><a href="addstudent.jsp">Add Student</a></p>
    <p><a href="searchstu.jsp" >View profile</a></p>
    <p><a href="updatestu.jsp" >Update Details</a></p>
    <p><a href="deletestu.jsp" >Delete Student</a></p>
    <p><a href="Studentdisplayall.jsp" >List all Student</a></p>
    </div>
    <div id="wrapper">

    <ul id="navigation">
    <li><a href="Employeehome.html">Home</a></li>
    <li><a href="Aboutusemp.html">About us</a></li>
    <li><a href="Contactusemp.html">Contact us</a></li>
    <li><a href="Empprofile.jsp">Profile</a></li>
    <li><a href="homestu1.jsp">Student</a></li>
    <li><a href="Collhome.html">College</a></li>
    <li><a href="logout.jsp">Logout</a></li>

    </ul>
    </div>
    <%

    String a[]=new String[50];
    int i=0,j=0;
    try

    {
    Statement statement=null;
    Connection con=null;
    con = ConnectionDAO.getConnection();
    statement = con.createStatement();
    ResultSet rs=statement.executeQuery("select * from college21 order by name");

    //out.println("hai5");

    while(rs.next())

    {

    //out.println("hai6");

    a[i]=rs.getString(2);

    i++;

    //out.println("i="+i);

    j=i;

    }


    }

    catch(Exception e)

    {

    out.println("Error "+e);

    }

    %>


    <center>
    <form id="form1" method= "post" name="cal" action="../StudentViewServ" onsubmit="return msg();">

    <div id="p2" >

    <div id="error1" style=color:red></div>
    <div id="error2" style=color:red></div>
    <div id="error3" style=color:red></div>
    <div id="error4" style=color:red></div>
    <div id="error5" style=color:red></div>
    <div id="error6" style=color:red></div>
    <div id="error7" style=color:red></div>
    <div id="error8" style=color:red></div>
    <div id="error9" style=color:red></div>
    <div id="error10" style=color:red></div>

    <table cellpadding="6">

    <th><h2>Register a student </h2></th>



    <tr align="left"><td><label id="p1">Student ID:<span class=b>*</span></label></td><td> <input type="text" name="sid" maxlength="6"/></td></tr>
    <tr align="left"><td><label id="p1">Student Name:<span class=b>*</span></label></td><td> <input type="text" name="sname" maxlength="20"/></td></tr>
    <tr align="left"><td><label id="p1">Age:<span class=b>*</span></label></td><td> <input type="text" name="sage" maxlength="2" /></td></tr>

    <tr align="left"><td><label id="p1"> Mobile Number:<span class=b>*</span></label></td>

    <td><input type="text" name="sname1" value="+91" disabled maxlength="3" size="3"/>

    <input type="text" name="sphn" maxlength="10" size="10" /></td></tr>
    <tr align="left"><td><label id="p1">Address:<span class=b>*</span> </label></td><td> <input type="text" name="saddr" /></td></tr>
    <tr align="left"><td><label id="p1">Location:<span class=b>*</span> </label></td><td> <input type="text" name="sloc" maxlength="10" /></td></tr>
    <tr align="left"><td><label id="p1">College name: <span class=b>*</span></label></td><td><select name="scoll">
    <option value="ch2">Select College</option>
    <% for(i=0;i<j;i++)
    {%>
    <option value=<%=a[i]%>><%out.println(a[i]);%></option>
    <% } %></select></td></tr>


    <tr align="left"><td><label id="p1">Current education<span class=b>*</span></label></td><td><select name="syr">


    <option value="ch2">-Select-</option>
    <option value="I">I</option>
    <option value="II">II</option>
    <option value="III">III</option>



    </select> </td></tr>
    <tr align="left"><td><label id="p1">Commited amount<span class=b>*</span></label></td><td><select name="scom">


    <option value="ch2">-Select-</option>
    <option value="2000">2000</option>
    <option value="3000">3000</option>
    <option value="4000">4000</option>
    <option value="5000">5000</option>


    </select> </td></tr>


    <tr align="left"><td><label id="p1">Password: <span class=b>*</span></label></td><td> <input type="password" name="spwd" /></td></tr>
    <tr><td></td><td><label id="p1"><span class=b>*</span> Mandatory Field</label></td></tr>
    </table>
    <input type="hidden" name="page" value="create"></input>
    <div style=text-align:center><button type="submit">Submit</button></div>
    </form>
    </center>
    </body>
    </html>

    ERROR

  2. #2
    mamtha is offline Member
    Join Date
    Jan 2012
    Posts
    10
    Rep Power
    0

    Default Re: Jsp:add student

    ERROR
    <!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=ISO-8859-1">
    <title>Insert title here</title>
    <link rel="stylesheet" href="../css/styllensep.css" type="text/css" />
    <SCRIPT type="text/javascript"> window.history.forward(); function noBack() { window.history.forward(); } </SCRIPT>
    </head>
    <body onload="noBack();" onpageshow="if (event.persisted) noBack();" onunload="">
    <div id="logo">
    </div>
    <div id="back">
    </div>


    <div id="sidenav">

    <p class="current_page_item"><a href="registerempbyadmin.html" >Add Employee</a></p>
    <p><a href="search3.jsp" >View profile</a></p>
    <p><a href="search1.jsp" >Update Details</a></p>
    <p><a href="search2.jsp" >Delete Employee</a></p>

    </div>
    <div id="wrapper">

    <ul id="navigation">
    <li><a href="Admintoemphome.html">Home</a></li>
    <li><a href="Aboutus.html">About us</a></li>
    <li><a href="contactus.html">Contact us</a></li>
    <li><a href="Adminprofile.jsp">Profile</a></li>
    <li><a href="Admintoemphome.html">Employee</a></li>

    <li><a href="logout.jsp">logout</a></li>
    </ul>
    </div>
    <center>
    <h1 id="p1">Search Error</h1>
    <p id="p1"> Employee ID is not found..Try with a valid ID </p>

    </center>
    </body>
    </html>

  3. #3
    mamtha is offline Member
    Join Date
    Jan 2012
    Posts
    10
    Rep Power
    0

    Default Re: Jsp:add student

    FAIL
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

    <html>

    <head>
    <title>Nsep</title>

    <link rel="stylesheet" href="../css/styllensep.css" type="text/css" />
    <script type="text/javascript">



    function msg()
    {



    var ac=0;
    var bb=document.cal.sname.value;

    if(bb=="")
    {
    document.getElementById("error1").innerHTML="*Ente r the Student Name"
    document.cal.sname.focus();
    ac=1;
    return false;
    }
    var a='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstu vwxyz';
    for(j=0;j<bb.length;j++)

    {

    if(a.indexOf(bb.charAt(j))<0)

    {

    document.getElementById("error1").innerHTML="*Stud ent Name Should not contain Intergers or Special characters"
    ac=1;
    document.cal.sname.focus();
    return false;
    }


    }

    if(ac==0)
    {
    document.getElementById("error1").innerHTML=""
    }



    var rr=0;
    var c='0123456789';
    var b1=document.cal.age.value;
    if(b1=="" || b1.length!=2)
    {
    rr=1;
    document.getElementById("err1").innerHTML="*age cannot be empty and should be of 2 digits.";
    document.cal.age.focus();
    return false;
    }
    for(j=0;j<b1.length;j++)
    {
    if(c.indexOf(b1.charAt(j))<0)
    {
    rr=1;
    document.getElementById("err1").innerHTML="*Enter a vaild age";
    document.cal.age.focus();
    return false;
    }
    }
    if(rr==0)
    {
    document.getElementById("err1").innerHTML="";

    }






    var ad=0;
    var bc=document.cal.phn.value;

    if(bc=="")
    {
    document.getElementById("error").innerHTML="*Enter Student's Contact Number"
    document.cal.phn.focus();
    return false;
    ad=1;
    }
    if(bc!="")
    {
    if(isNaN(bc))
    {
    document.getElementById("error").innerHTML="*Stude nt's contact number should be in integers"
    document.cal.phn.focus();
    ad=1;
    return false;
    }
    if(bc.length<10)
    {
    document.getElementById("error").innerHTML="*Stude nt's contact Number should be in integers and exactly 10 digits"
    document.cal.phn.focus();ad=1;
    return false;
    }
    }
    if(ad==0)
    {
    document.getElementById("error").innerHTML="";
    }



    var g=0;

    var b3=document.cal.add.value;
    if(b3=="" || b3.length<20)
    {

    var g=1;
    document.getElementById("err2").innerHTML="*Addres s should be more than 20 characters";
    document.cal.add.focus();
    return false;
    }
    else
    {

    document.getElementById("err2").innerHTML="";
    }




    var m=0;
    var bb=document.cal.loc.value;

    if(bb=="")
    {
    document.getElementById("error5").innerHTML="*Ente r the Location"
    document.cal.loc.focus();
    return false;
    m=1;
    }
    var a='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstu vwxyz';
    for(j=0;j<bb.length;j++)

    {

    if(a.indexOf(bb.charAt(j))<0)

    {

    document.getElementById("error5").innerHTML="*Loca tion Should not contain Intergers or Special characters"
    ac=1;

    document.cal.loc.focus();
    return false;
    }


    }

    if(m==0)
    {
    document.getElementById("error5").innerHTML="";
    }












    var r=0;
    var b5=document.cal.coll.value;
    if(b5=="")
    {
    r=1;
    document.getElementById("err4").innerHTML="*Colleg e Name can't be empty";
    document.cal.coll.focus();
    return false;
    }
    var a='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstu vwxyz';
    for(j=0;j<b5.length;j++)
    {
    if(a.indexOf(b5.charAt(j))<0)
    {
    r=1;
    document.getElementById("err4").innerHTML="*Enter valid College Name";
    document.cal.coll.focus();
    return false;
    }
    }
    if(r==0)
    {
    document.getElementById("err4").innerHTML="";

    }



    var f=0;
    var z=document.cal.abc;
    if(z.selectedIndex ==0)
    {
    f=1;
    document.getElementById("err5").innerHTML="*Select Year";
    return false;
    }
    else
    {
    document.getElementById("err5").innerHTML="";

    }



    var h=0;
    var z=document.cal.com;
    if(z.selectedIndex ==0)
    {
    h=1;
    document.getElementById("err6").innerHTML="*Select commited amount";
    return false;
    }
    else
    {
    document.getElementById("err6").innerHTML="";

    }








    if(ac==0 && ad==0 && r==0 && rr==0 && g==0 && f==0 && m==0 && h==0)
    {
    document.getElementById("error").innerHTML="Studen t has been successfully registered"

    document.getElementById("error4").innerHTML="click next to continue"

    document.getElementById("sname").value=""
    document.getElementById("age").value=""
    document.getElementById("phn").value=""
    document.getElementById("add").value=""
    document.getElementById("loc").value=""
    document.getElementById("coll").value=""
    document.getElementById("abc").value=""
    document.getElementById("com").value=""
    }
    }

    </script>
    </head>
    <body>
    <div id="logo">
    </div>
    <div id="back">
    </div>


    <div id="sidenav">

    <p><a href="addstudent.jsp">Add Student</a></p>
    <p><a href="search.jsp" >View profile</a></p>
    <p><a href="update.jsp" >Update Details</a></p>
    <p><a href="deletestu.jsp" >Delete Student</a></p>

    </div>
    <div id="wrapper">
    <ul id="navigation">
    <li><a href="Employeehome.html">Home</a></li>
    <li><a href="Aboutemp.html">About us</a></li>
    <li><a href="Contactusemp.html">Contact us</a></li>
    <li><a href="Empprofile.jsp">Profile</a></li>
    <li><a href="home.jsp">Student</a></li>

    <li><a href="Collhomeemp.html">College</a></li>

    </ul>
    </div>
    <center>
    <form id="form1" name="cal" action="home.jsp" onsubmit="return msg();">

    <div id="p2" >

    <div id="error1" style=color:red></div>
    <div id="err1" style=color:red></div>
    <div id="error" style=color:red></div>
    <div id="err2" style=color:red></div>
    <div id="error5" style=color:red></div>
    <div id="error4" style=color:red></div>
    <div id="error2" style=color:red></div>
    <div id="err4" style=color:red></div>
    <div id="err5" style=color:red></div>
    <div id="err6" style=color:red></div>
    <div id="error3" style=color:red></div></div>
    <div id="error" style=color:red></div>
    <table cellpadding="6">

    <th><h2>FAILED </h2></th>



    <tr><td><label id="p1">FAILED<span class=b>*</span></label></td><td>



    </table>

    <div style=text-align:center><button type="submit">Submit</button> <input type="reset" value="Reset" />&nbsp;&nbsp<input type="button" value="Next"/></div>
    </form>
    </center>
    </body>
    </html>

  4. #4
    mamtha is offline Member
    Join Date
    Jan 2012
    Posts
    10
    Rep Power
    0

    Default Re: Jsp:add student

    LOGIN STU

    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <!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=ISO-8859-1">
    <title>Nsep</title>

    <link rel="stylesheet" href="../css/styllensep1.css" type="text/css" />
    <script type="text/javascript">


    window.history.forward();
    function noBack()
    {
    window.history.forward();
    }
    setTimeout("noBack()", 0);

    function msg()
    {
    var ide=0;
    var sid=document.cal.sid.value;
    if(sid=="")
    {
    document.getElementById("error").innerHTML="*Enter Student's ID"
    document.cal.sid.focus();
    ide=1;
    return false;
    }
    if(sid!="")
    {
    if(isNaN(sid))
    {
    document.getElementById("error").innerHTML="*Stude nt's ID number should be in integers"
    document.cal.sid.focus();
    ide=1;
    return false;
    }

    if(sid.length<6)
    {
    document.getElementById("error").innerHTML="*Stude nt's ID should be in integers and exactly 6 digits"
    document.cal.sid.focus();ide=1;
    return false;
    }
    }
    if(ide==0)
    {
    document.getElementById("error").innerHTML=""
    }
    var pw=0;
    var sspwd=document.cal.password.value;
    if(sspwd=="")
    {
    document.getElementById("error").innerHTML="*Enter Password"
    document.cal.sid.focus();
    pw=1;
    return false;
    }
    if(pw==0)
    {
    document.getElementById("error").innerHTML=""
    }

    }


    </script>
    </head>
    <body onload="noBack()">
    <div id="logo">
    </div>



    <div id="wrapper">

    <ul id="navigation">
    <li><a href="/nsep_emp1/html/Mainhome.html">Home</a></li>
    <li><a href="aboutus.jsp">About us</a></li>
    <li><a href="contactus.html">Contact</a></li>
    <li><a href="login.html">Employee</a></li>
    <li><a href="loginstu.jsp">Student</a></li>
    </ul>
    </div>
    <center>
    <form id="form6" name="cal" method="post" action="..\StudentViewServ" onsubmit="return msg();">
    <div >


    <div id="error" style=color:red></div></div>
    <h1 id="p1">Student login</h1>
    <label id="p1"><b>User ID</b><span class=b>*</span></label><input type="text" name="sid" maxlength=6></input><br/><label id="p1"><b>password</b><span class=b>*</span></label><input type="password" name="password"></input><br/>

    <input type="hidden" value="login" name="page">

    <label id="p1"><span class=b>*</span> Mandatory Field</label>
    <br/>
    <input type="submit" value="Login"></input>

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

  5. #5
    mamtha is offline Member
    Join Date
    Jan 2012
    Posts
    10
    Rep Power
    0

    Default Re: Jsp:add student

    VIEW STUDENT
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

    <html>

    <head>
    <title>Nsep</title>

    <link rel="stylesheet" href="./css/styllensep.css" type="text/css" />
    <script type="text/javascript">
    window.history.forward();
    function noBack()
    {
    window.history.forward();
    }
    setTimeout("noBack()", 0);




    </script>
    </head>
    <body onload="noBack()">
    <div id="logo">
    </div>
    <div id="back">
    </div>

    <div id="sidenav">

    <p><a href="html/addstudent.jsp">Add Student</a></p>
    <p><a href="html/searchstu.jsp" >View profile</a></p>
    <p><a href="html/updatestu.jsp" >Update Details</a></p>
    <p><a href="html/deletestu.jsp" >Delete Student</a></p>
    <p><a href="html/Studentdisplayall.jsp" >List all Student</a></p>

    </div>
    <div id="wrapper">

    <ul id="navigation">
    <li><a href="html/Empoyeehome.html">Home</a></li>
    <li><a href="html/Aboutusemp.html">About us</a></li>
    <li><a href="html/Contactusemp.html">Contact us</a></li>
    <li><a href="html/Empprofile.jsp">Profile</a></li>
    <li><a href="html/homestu1.jsp">Student</a></li>
    <li><a href="html/Collhome.html">College</a></li>
    <li><a href="html/logout.jsp">Logout</a></li>

    </ul>
    </div>
    <center>
    <form id="form1" method= "post" name="cal" action="html/homestu1.jsp" onsubmit="return msg();">

    <div id="p2" >

    <table cellpadding="6">

    <th><h2>view a student </h2></th>



    <tr align="left"><td><label id="p1">Student ID:</label></td><td> <input type="text" name="sid" value=<%= request.getAttribute("id") %> maxlength="6" disabled/></td></tr>
    <tr align="left"><td><label id="p1">Student Name:</label></td><td> <input type="text" name="sname" value="<%= request.getAttribute("name") %>" disabled/></td></tr>
    <tr align="left"><td><label id="p1">Age:</label></td><td> <input type="text" name="sage" value=<%= request.getAttribute("age") %> disabled /></td></tr>

    <tr align="left"><td><label id="p1"> Mobile Number:</label></td>

    <td><input type="text" name="sname1" value="+91" disabled maxlength="3" size="3"/>

    <input type="text" name="sphn" maxlength="10" size="10" value=<%= request.getAttribute("mobile") %> disabled/></td></tr>
    <tr align="left"><td><label id="p1">Address:</label></td><td> <input type="text" name="saddr" value="<%= request.getAttribute("address") %> "disabled/></td></tr>
    <tr align="left"><td><label id="p1">Location:</label></td><td> <input type="text" name="sloc" value="<%= request.getAttribute("location") %> "maxlength="10" disabled/></td></tr>

    <tr align="left"><td><label id="p1">College name:</label></td><td> <input type="text" name="scoll" value="<%= request.getAttribute("college") %>" disabled/></td></tr>


    <tr align="left"><td><label id="p1">Current education:</label></td><td><input type="text" name="syr" value=<%= request.getAttribute("year") %> disabled/></td></tr>

    <tr align="left"><td><label id="p1">Committed amount:</label></td><td><input type="text" name="scom" value=<%= request.getAttribute("amount") %> disabled/></td></tr>


    </table>

    <div style=text-align:center><button type="submit">Ok</button></div>
    </form>
    </center>
    </body>
    </html>

  6. #6
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,535
    Blog Entries
    7
    Rep Power
    20

    Default Re: Jsp:add student

    Cool! More wallpaper ...

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  7. #7
    mamtha is offline Member
    Join Date
    Jan 2012
    Posts
    10
    Rep Power
    0

    Default Re: Jsp:add student

    SEARCH STU

    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

    <html>

    <head>
    <title>Nsep</title>

    <link rel="stylesheet" href="../css/styllensep.css" type="text/css" />
    <script type="text/javascript">
    window.history.forward();
    function noBack()
    {
    window.history.forward();
    }
    setTimeout("noBack()", 0);



    function msg()
    {
    var ide=0;
    var sid=document.cal.sid.value;
    if(sid=="")
    {
    document.getElementById("error").innerHTML="*Enter Student's ID"
    document.cal.sid.focus();
    ide=1;
    return false;
    }
    if(sid!="")
    {
    if(isNaN(sid))
    {
    document.getElementById("error").innerHTML="*Stude nt's ID number should be in integers"
    document.cal.sid.focus();
    ide=1;
    return false;
    }

    if(sid.length<6)
    {
    document.getElementById("error").innerHTML="*Stude nt's ID should be in integers and exactly 6 digits"
    document.cal.sid.focus();ide=1;
    return false;
    }
    }
    if(ide==0)
    {
    document.getElementById("error").innerHTML=""
    }

    }


    </script>
    </head>
    <body onload="noBack()">
    <div id="logo">
    </div>
    <div id="back">
    </div>



    <div id="sidenav">

    <p><a href="addstudent.jsp">Add Student</a></p>
    <p><a href="searchstu.jsp" >View profile</a></p>
    <p><a href="updatestu.jsp" >Update Details</a></p>
    <p><a href="deletestu.jsp" >Delete Student</a></p>
    <p><a href="Studentdisplayall.jsp" >List all Student</a></p>
    </div>
    <div id="wrapper">

    <ul id="navigation">
    <li><a href="Employeehome.html">Home</a></li>
    <li><a href="Aboutusemp.html">About us</a></li>
    <li><a href="Contactusemp.html">Contact us</a></li>
    <li><a href="Empprofile.jsp">Profile</a></li>
    <li><a href="homestu1.jsp">Student</a></li>
    <li><a href="Collhome.html">College</a></li>
    <li><a href="logout.jsp">Logout</a></li>

    </ul>
    </div>
    <center>
    <form id="form1" method= "post" name="cal" action="../StudentViewServ" onsubmit="return msg();">

    <div id="p2" >

    <div id="error" style=color:red></div>

    <table cellpadding="6">

    <th><h2>search a student </h2></th>



    <tr><td><label id="p1">Student ID:<span class=b>*</span></label></td><td> <input type="text" name="sid" maxlength="6"/></td></tr>


    <tr><td></td><td><label id="p1"><span class=b>*</span> Mandatory Field</label></td></tr>
    </table>
    <input type="hidden" name="page" value="view"></input>
    <div style=text-align:center><button type="submit">Submit</button> </div>
    </form>
    </center>
    </body>
    </html>

Similar Threads

  1. student need help
    By adamrain in forum New To Java
    Replies: 9
    Last Post: 11-28-2009, 11:10 PM
  2. Student--begginer--help!!!
    By AmandaIT in forum New To Java
    Replies: 6
    Last Post: 05-09-2008, 03:37 AM
  3. Student Help
    By mattwaab in forum Java Applets
    Replies: 0
    Last Post: 02-08-2008, 05:31 PM
  4. help student
    By jvasilj1 in forum New To Java
    Replies: 15
    Last Post: 02-02-2008, 08:23 AM
  5. please help a student
    By jvasilj1 in forum New To Java
    Replies: 0
    Last Post: 02-01-2008, 01:11 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •