data fecth from data base in( sql 2000) htmlform and jsp

Ads
 

data fecth from data base in( sql 2000) htmlform and jsp

hi iam using jsp and html form data fecth from database display the textbox help me i want whenever select from dropdown list select the projectname to display the projectid relevent code (990)display textbox my code here

<%--

    Document   :login1
    Created on : Jul 19, 2013, 2:53:41 PM
    Author     : CG0T4908
--%>

<%@page import= "java.io.*, java.sql.*,java.lang.String,java.util.*,java.net.*"%>
<%@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">

<%
        String Ename = (String) session.getAttribute("EmployeeName");
        String Empid = (String) session.getAttribute("EmployeeID");%>

<html xmlns:wicket="http://wicket.apache.org">
    <head>
        <style type="text/css">
            .divTable{
                display:  table;
                width:auto;
                background-color:#DCDCDC;
                border:1px solid #666666;
                border-spacing:2px;






            }
            .divTable tr,td {


                background:#b5cfd2 url('cell-blue.jpg');
                border-width: 1px;
                padding: 5px;

                border-color: #999999;
            }
            td {


               height: 50px;
               width:50px;



                background:#dcddc0 url('cell-grey.jpg');
                border-width: 1px;
                padding: 8px;
                text-align:right;
                border-color: #999999;
            }
        </style>




        <style>
            body

            {
                background-color:#DCDCDC;
            }

            h1
            {
                color:#DAA520;
                text-align:center;
            }



        </style>

        <title>Wicket Examples - signin2</title>
        <link rel="stylesheet" type="text/css" href="style.css"/>
    </head>
    <body>

        <span wicket:id="mainNavigation"/>

        <table border="0%" align="right" color="#DCDCDC">
        <tr><td>     <wicket:link><p><a  href="index.jsp"><font color=sky>Logout</font></a></p></wicket:link></td></tr></table>

    </body>
</html>





<html><head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

    </head>


    <body bgcolor="#778899">
        <script src="jquery-1.3.2.min.js"></script>
        <style type="text/css">


        </style>

        <script type="text/javascript">
            $(document).ready(function()
            {
                $("#projectname").click(function ()
                {
                    var value = $('#projectname').val();
                    var vv=$("#projectid").val(value);
                });
            });
        </script>
        <script>
            function  validate()
            {
                var pro=document.xxx.projectid.value;
                var task=document.xxx.task.value;
                var Reqe=document.xxx.RequirementID.value;

                if(pro=="")
                {
                    alert("Enter  Project ID");
                    return false;}
                if(task=="")
                { alert("Enter Task ID");
                    return false;
                }
                if(Reqe=="")
                {
                    alert("Enter Requirement ID")
                }
                return true;

            }
        </script>

        <form action="insertdate.jsp" method="post" name="xxx" id="xxx" onsubmit="return validate();">
            <table border="1" align="left" width="100%" fontcolr="#DAA520"><b><h1>Time Desk</h1></b></table><br>
            <br><table border="00" align="left" width="30%" bgcolor=""><tr><td><a href="login1.jsp"><b>TimeSheet</b></a></td><td><a href="cgepasword.jsp"><b>ChangePassword</b></a></td><td><a href="view"><b> View</b></a></td></tr></table>


            <br><br>
            <div class="divTable" align="center" >



   <h4><th> <td>Employee Name:</td><td><input type="text" readonly="true" id="empname" name="empname" value="<%=Ename%>"></td></th>

   <td>EmployeeID :</td><td><input type="text" name="empid" readonly="true" value="<%=Empid%>"></td></h4>



               **
 <h4> <td>Project Name:</td><td>

                        <select id="projectname" name="projectname">
                            <option value="None" >-- Select --</option>
                            <option value="22">Asset Management</option>
                            <option value="43">AttendanceMgmt</option>
                            <option value="9">Bajaj-Dev</option>
                            <option value="32">CE </option>
                            <option value="38">DES</option>
                            <option value="30">DMS</option>
                            <option value="46">FAS</option>
                            <option value="8">FES-Dev</option>
                            <option value="3">FES-Sup</option>
                            <option value="19">Java</option>
                            <option value="44">Job Management</option>
                            <option value="7">M&M-AO</option>
                            <option value="41">Sun Powerol</option>
                            <option value="14">TechM</option>
                    </select></td>


                &nbsp;&nbsp;&nbsp;&nbsp;  ProjectID: <input type="text" name="projectid" id="projectid" type="text" value="" />  </h4>

                <h4>  Category:&nbsp;&nbsp;&nbsp;
                    <select id="category" name="category"><option value="Select">Select</option>
                        <option value="Analyse">Analyse</option>
                        <option value="Bug fixing">Bug fixing</option>
                        <option value=" Check list preparation">Checklistpreparation</option>
                        <option value="Clarification">Clarification</option>
                        <option value=" Client interaction">Client interaction</option>
                        <option value="Code Review">Code Review</option>
                        <option value="Coding">Coding</option>
                        <option value="Dealer issue">Dealer issue</option>
                        <option value=" Defect Tracking">Defect Tracking</option>
                        <option value="Discussion">Discussion</option>
                        <option value=" Test">Test</option>
                    </select>


                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Task ID:
                <input type="text" name="taskid" id="task"> </h4>

                <h4>
                Requirement ID:<input type="text" name="RequirementID" id="RequirementID">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;    Date:<input type="text" name="Date" id="dat" readonly="true"/>   </h4>

                <h4>
                    StartTime:<select id="Starttime" name="starttime">

                        <option value="01">01</option>
                        <option value="02">02</option>
                        <option value="03">03</option>
                        <option value="04">04</option>
                        <option value="05">05</option>
                        <option value="06">06</option>
                        <option value="07">07</option>
                        <option value="08">08</option>
                        <option value="09">09</option>
                        <option value="10">10</option>
                        <option value="11">11</option>
                        <option value="12">12</option>
                    </select>


                    <select name="minutes" id="minutes"><option value="00">00</option>
                        <option value="01">01</option>
                        <option value="02">02</option>
                        <option value="03">03</option>
                        <option value="04">04</option>
                        <option value="05">05</option>
                        <option value="06">06</option>
                        <option value="07">07</option>
                        <option value="08">08</option>
                        <option value="09">09</option>
                        <option value="10">10</option>
                        <option value="11">11</option>
                        <option value="12">12</option>
                        <option value="13">13</option>
                        <option value="14">10</option>
                        <option value="15">15</option>
                        <option value="16">16</option>
                        <option value="17">17</option>
                        <option value="18">18</option>
                        <option value="19">19</option>
                        <option value="20">20</option>
                        <option value="21">21</option>
                        <option value="22">22</option>
                        <option value="23">23</option>
                        <option value="24">24</option>
                        <option value="25">25</option>
                        <option value="26">26</option>
                        <option value="27">27</option>
                        <option value="28">28</option>
                        <option value="29">29</option>
                        <option value="30">30</option>
                        <option value="31">31</option>
                        <option value="32">32</option>
                        <option value="33">33</option>
                        <option value="34">34</option>
                        <option value="35">35</option>
                        <option value="36">36</option>
                        <option value="37">37</option>
                        <option value="38">38</option>
                        <option value="39">39</option>
                        <option value="40">40</option>
                        <option value="41">41</option>
                        <option value="42">42</option>
                        <option value="43">43</option>
                        <option value="44">44</option>
                        <option value="45">45</option>
                        <option value="46">46</option>
                        <option value="47">47</option>
                        <option value="48">48</option>
                        <option value="49">49</option>
                        <option value="50">50</option>
                        <option value="51">51</option>
                        <option value="52">52</option>
                        <option value="53">53</option>
                        <option value="54">54</option>
                        <option value="55">55</option>
                        <option value="56">56</option>
                        <option value="57">57</option>
                        <option value="58">58</option>
                    <option value="59">59</option></select>

                    <select id="ampms" name="ampms"><option value="Am" >Am</option>
                    <option value="Pm">pm</option></select>


                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EndTime:<select id="Endtime" name="Endtime"><option value="01">01</option>

                        <option value="01">01</option>
                        <option value="02">02</option>
                        <option value="03">03</option>
                        <option value="04">04</option>
                        <option value="05">05</option>
                        <option value="06">06</option>
                        <option value="07">07</option>
                        <option value="08">08</option>
                        <option value="09">09</option>
                        <option value="10">10</option>
                        <option value="11">11</option>
                    <option value="12">12</option></select>


                    <select name="endtimeminutes" id="endtimeminutes"><option value="00">00</option>
                        <option value="01">01</option>
                        <option value="02">02</option>
                        <option value="03">03</option>
                        <option value="04">04</option>
                        <option value="05">05</option>
                        <option value="06">06</option>
                        <option value="07">07</option>
                        <option value="08">08</option>
                        <option value="09">09</option>
                        <option value="10">10</option>
                        <option value="11">11</option>
                        <option value="12">12</option>
                        <option value="13">13</option>
                        <option value="14">10</option>
                        <option value="15">15</option>
                        <option value="16">16</option>
                        <option value="17">17</option>
                        <option value="18">18</option>
                        <option value="19">19</option>
                        <option value="20">20</option>
                        <option value="21">21</option>
                        <option value="22">22</option>
                        <option value="23">23</option>
                        <option value="24">24</option>
                        <option value="25">25</option>
                        <option value="26">26</option>
                        <option value="27">27</option>
                        <option value="28">28</option>
                        <option value="29">29</option>
                        <option value="30">30</option>
                        <option value="31">31</option>
                        <option value="32">32</option>
                        <option value="33">33</option>
                        <option value="34">34</option>
                        <option value="35">35</option>
                        <option value="36">36</option>
                        <option value="37">37</option>
                        <option value="38">38</option>
                        <option value="39">39</option>
                        <option value="40">40</option>
                        <option value="41">41</option>
                        <option value="42">42</option>
                        <option value="43">43</option>
                        <option value="44">44</option>
                        <option value="45">45</option>
                        <option value="46">46</option>
                        <option value="47">47</option>
                        <option value="48">48</option>
                        <option value="49">49</option>
                        <option value="50">50</option>
                        <option value="51">51</option>
                        <option value="52">52</option>
                        <option value="53">53</option>
                        <option value="54">54</option>
                        <option value="55">55</option>
                        <option value="56">56</option>
                        <option value="57">57</option>
                        <option value="58">58</option>
                        <option value="59">59</option>

                    </select>


                    <select name="endtimeampm" id="endtimeampm"><option value="Am">Am</option>
                <option value="Pm">pm</option></select>  </h4>
                <table border="10%" align="center" bgcolor="#c8d6f9">
                    <tr> <td><p>Task Description</p>



                        <td align="right"> <textarea name="comments" id="comments" cols="60" rows="3">

                        </textarea> </td>

                </tr></table>




                <tr><!--<center><a href="viewoption">Save</a></center>-->
            <center> <input type="submit" name="submit" value="save"> </center></div>

            <!--<center><input type="button" name="reset" value="Clear"> </center>-->
 <%
            if(request.getParameter("msg")==null)
                {
                 }
            else
                {
                  %><br>
             <center>     <font color="redblue"><%=request.getParameter("msg")%></font></center>
                    <%
            }
            %>

        </form>
        <script>
            var date = new Date();

            var month = date.getMonth()+1;
            var day = date.getDate();

            var output = date.getFullYear() + '/' +
                ((''+month).length<2 ? '0' : '') + month + '/' +
                ((''+day).length<2 ? '0' : '') + day;
            document.getElementById("dat").value=output;
        </script>



</body>  </html>
View Answers

Ads









Related Tutorials/Questions & Answers:
data fecth from data base in( sql 2000) htmlform and jsp
data fecth from data base in( sql 2000) htmlform and jsp  hi iam using jsp and html form data fecth from database display the textbox help me i want whenever select from dropdown list select the projectname to display
data (image ,audio) inserting to data base (oracle 10g) and retriving the same data from jsp
data (image ,audio) inserting to data base (oracle 10g) and retriving the same data from jsp   data (image ,audio) inserting to data base (oracle 10g) and retriving the same data from jsp with script of data base plz help me
Advertisements
Retrieving data from data base using jsp combo box
Retrieving data from data base using jsp combo box  Hi guys please help me , i have on GUI page int that Server type(like apache,jboss,weblogic) one... of the server it has to display the process name from database into the process name
how to insert the bulk data into the data base from the table of jsp page to another jsp page
how to insert the bulk data into the data base from the table of jsp page to another jsp page  pls help i'm doing the project called centralized... to insert the marks details into the data base i have retrive the rollno and name
JSP data base validation
JSP data base validation  please explain how to validate form input string with database n also how its notify that entered data exists already...("sName"); String phno = request.getParameter("phno"); String sql = "insert
getting int values from form and insert it in data base in jsp
getting int values from form and insert it in data base in jsp  how...; Hi, You can get the parameter from the request object: String s... = Integer.parseInt(s); Then you can write JDBC code to insert data
Retrive the data from the table in data base using jdbc
Retrive the data from the table in data base using jdbc  Retrive the data from the table in data base using jdbc   JDBC Tutorials
retrive data from oracle to jsp
retrive data from oracle to jsp  i am a beginer in jsp so please help... cost and manager name and storing it in the data base. in search proj fiel... connected to data base
retrive data from data base and print it in every page until logout
retrive data from data base and print it in every page until logout  ... the USER NAME through retriving from database.suppose from home page he go to next... in JSP
Retrieve data from databse using where in JSP
Retrieve data from databse using where in JSP  Hi, can somebody help me? I have a jsp page. in that i want to get data from the database where...=request.getParameter("username"); String sql; sql="SELECT * FROM register WHERE
How we delete a data of database from front end jsp page
How we delete a data of database from front end jsp page   I make a website and featch a data from data base and now i want that a delete button put... deleted from jsp page as well as from database.I used mysql and jsp. Please help me
Exporting data from mysql into csv using jsp
Exporting data from mysql into csv using jsp  Hi friends.... I want to export the data from mysql to csv file using... i am having 30 columns in my database.. Eg- text1,text2,text3,....,upto text30... i want to export this data
how to get data from database into dropdownlist in jsp
tutorial go through the link JSP Get Data Into Dropdown list From Database   ...how to get data from database into dropdownlist in jsp  Can anybody tell me what is the problem in this code as i am not able to fetch the data from
jsp programe for displaying data from database
/WebSevices/19592-retriving-data-from-sql-server-using-jsp-code-and-placing-them...jsp programe for displaying data from database  i am using JSP.i want..."')"); ResultSet rs = stmt.executeQuery( "SELECT * FROM data"); String id
jsp programe for displaying data from database
/WebSevices/19592-retriving-data-from-sql-server-using-jsp-code-and-placing-them...jsp programe for displaying data from database  i am using JSP.i want..."')"); ResultSet rs = stmt.executeQuery( "SELECT * FROM data"); String id
jsp programe for displaying data from database
/WebSevices/19592-retriving-data-from-sql-server-using-jsp-code-and-placing-them...jsp programe for displaying data from database  i am using JSP.i want..."')"); ResultSet rs = stmt.executeQuery( "SELECT * FROM data"); String id
data retrival from database throw simple jsp..
data retrival from database throw simple jsp..  We can retrieve the the data from data base simple jsp page: Jsp Page:retrive.jsp <...; Statement stmt = null; String Query="SELECT * FROM STUD"; try
Display Data from Database in JSP
, to show data from the database click on the link that calls another .jsp file named... this jsp page and show all data from the table. Click on the <--back...; <html> <head> <title>display data from
displaying data retrieved from a database in a jsp page
displaying data retrieved from a database in a jsp page  the page... sql = "select billid, customerid, billdate, status from customerbills where...(sql); stmt.setString(1, custId); ResultSet rs = stmt.executeQuery(); if (rs.next
how to get data from database into dropdownlist in jsp
how to get data from database into dropdownlist in jsp  //Customer...:3306/scs","root","root"); Statement st=con.createStatement(); String sql="select * from staff"; ResultSet rs=st.executeQuery(sql); while(rs.next
How to read and display data from a .properties file from a jsp page
How to read and display data from a .properties file from a jsp page ... the data from this .properties file and display it in table format. Ex:by using... = DEDCHGG_PWDP and goes on... I have to create a jsp page to show these data
retrieving of data from one jsp to another jsp - JSP-Servlet
retrieving of data from one jsp to another jsp  using jsp i m displaying a table ,in table i m displaying a radio button then values like id,name etc... that is used for different jsp please help me sir... thanks in advance   Hi
How to export data from jsp to excel sheet by using java
How to export data from jsp to excel sheet by using java   How to export data from jsp to excel sheet by using java
how to get data from database into dropdownlist in jsp
how to get data from database into dropdownlist in jsp  Customer Name...=con.createStatement(); String sql="select * from staff"; ResultSet rs=st.executeQuery(sql); while(rs.next()){ } %> <option value
Importing data into sql plus from a text file...
Importing data into sql plus from a text file...  How to import a text file into oracle 10g enterprise edition directly to create tables and data
Importing data into sql plus from a text file...
Importing data into sql plus from a text file...  How to import a text file into oracle 10g enterprise edition directly to create tables and data
How to show data from database in textbox in jsp
How to show data from database in textbox in jsp   How to show data from database in textbox in jsp   Here is an example that retrieve the particular record from the database and display it in textbox using JSP. <
How to Get The Data from Excel sheet into out jsp page???
How to Get The Data from Excel sheet into out jsp page???  How to Get The Data from excel sheet to out jsp page in webApp
design chart takes data from database and through jsp page
design chart takes data from database and through jsp page  how can I design chart takes data from database and through in jsp page
How to Retrieve data from database in jsp
How to Retrieve data from database in jsp In this section we will discuss... a database connection at the JSP page then write a SQL query "SELECT * from... is the video tutorial of "How to retrieve data from database and Display in JSP Page
how to display data from jsp file into database
how to display data from jsp file into database  this is a jsp file...(); in the below example. the error is "cannot convert from java.sql.Statement...+","+ph2+")"); out.println("Data is successfully inserted

Ads