Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners data fecth from data base in( sql 2000) htmlform and jsp
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


chinnadurai
data fecth from data base in( sql 2000) htmlform and jsp
0 Answer(s)      a year and 2 months ago
Posted in : Java Beginners


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>

Advertisement
View Answers

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
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
Advertisements
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
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
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
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
for store data in data base - JSP-Servlet
for store data in data base  i want to a job site, in this site user..... and on 3rd form i use submit button... data of form 1 and 2 can also be store in table along with 3 form.. how can i do it... i use sql server2000  Hi
data base
data base  how to connect coding in data base ?   The given code connects JSP page to database. You need to import the mysql connection jar file to jdk as well as to the lib of tomcat. Moreover you need to set classpath
DATA BASE
:3306/test", "root", "root" ); String sql = "Select name,address from data...DATA BASE  Create a program to establish a connection to the PCTBC... the data using a J Table.   Here is a code that connects to MySql
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 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
Data base Connectivity
Data base Connectivity  How to configure JDBC connection for Oracle data base.In configuring it is asking select Data server name and TNS.I typed Oracle for Data Server Name and IN TNS what to type? I pulled the list for TNS
value is inserted into the sql table through jsp-jdbc but not getting stored into the data base,only row is increasing.
value is inserted into the sql table through jsp-jdbc but not getting stored into the data base,only row is increasing.  <html> <..."> <title>JSP Page</title> <style type
Data base related question
Data base related question  sir my table has only one element(that is pno),i am using ms-access as backend. i put only one element i want to retrieve...:odbc:oldp"); stmt2=con2.createStatement(); String st2="select * from pname order
Data base - JDBC
Data base  I want to do this Inserting a record with Object type column using PreparedStatement but wht should b the column datatype this is te..."); con.close(); }//main }//class For this should i create a user defined data type
delete data from database - SQL
delete data from database  HOw to delete specific data from table> I want to delete one record from database. Thnx  Hi friend.... http://www.roseindia.net/jsp/user-search.shtml Thanks
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
please send me the banking data base in swings
please send me the banking data base in swings  sir, please send me how to create the banking data base program in swings
Data fetching from JSP or HTML - JSP-Servlet
Data fetching from JSP or HTML  Hi Deepak, Can u pls help me as i have a problem with jsp/html frameset. my question is how can i fetch the data from frameset which is in html format.pls help me. Thanks
data are not display in JSP from database - JSP-Servlet
data are not display in JSP from database   i want to finding some data through a SQL query from SQL server database to a JSP page based on some... of this jsp page. like.. School Result and three request parameters 'class', 'from
how to display data from database in jsp
how to display data from database in jsp  how to display data from database in jsp
read excel data from jsp - JSP-Servlet
read excel data from jsp  Hi how to read excel file from jsp? Excel file is created manually entered data having many sheets? and read the entire sheet and also edit with jsp? pls suggest me?   Hi Friend, 1
when refreshing the page the data is stored in data base again
when refreshing the page the data is stored in data base again  Hi, In my application, I am adding form data in database on click of submit button.But the problem is, when user refreshes the page, the data added one more time
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
data base question - Java Interview Questions
data base question  first we create a table with out create primary kay,after that i want to create same record with primary key,but no duplicate record,no deletion and after creation.  Hi, Query to create
sql query to get data from two tables
sql query to get data from two tables  how can i get the data from two different tables?   Hi Friend, Please visit the following link: JOIN Query Simple Query Thanks
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
Struts2 and Hibernate Fetch Data Base Value
Struts2 and Hibernate Fetch Data Base Value  Hello Sir, I am facing the problem while fetching the database value on jsp page while using...;AdminProvideLeave>(); try { > Query q = session.createQuery("from >
Struts2 and Hibernate Fetch Data Base Value
Struts2 and Hibernate Fetch Data Base Value  Hello Sir, I am facing the problem while fetching the database value on jsp page while using...;AdminProvideLeave>(); try { > Query q = session.createQuery("from >
Data fetch from multiple SQL tables - Hibernate
Data fetch from multiple SQL tables   I am in the process of writing my first hibernate application. I have a sql query that fetches data from... chapter 13 example that fetches data from one table. Please advice. SQL from
Advertisements
 

 

 

DMCA.com