Home Answers Viewqa JSP-Servlet retrieve Dept Name from table dept and retrieve list of employee from emp table for that dept in combobox

 
 


Seshagiri
retrieve Dept Name from table dept and retrieve list of employee from emp table for that dept in combobox
0 Answer(s)      2 months and 3 days ago
Posted in : JSP-Servlet

I have an 2 textboxes and 1 combobox in my HTML page.

user will provide the input in one textbox then JSP code should retrieve data from database from table1 and display it in another textbox and from the same input paramter then its should retrieve the data from another table and display that list in combobox.

For example, In HTML page, we have Dept ID Textbox (Input Paramater), Dept Name Textbox, and Employee combobox.

If user enter 10 in Dept Number Textbox and onblur event,it should retrieve Dept Name from table dept(select deptno,deptname from dept where deptno=10) and retrieve list of employee from table emp for that dept in combobox using this query (select ename from emp e,dept d where e.deptno=d.deptno and d.deptno=10)

Out Put should be as below In Dept ID textbox it should be 10 In Dept Name textbox it should be Sales In employee Combobox,list of employee in dept 10

Can anybody help me in writing the JSP code for this.

View Answers









Related Pages:
retrieve Dept Name from table dept and retrieve list of employee from emp table for that dept in combobox
retrieve Dept Name from table dept and retrieve list of employee from emp table... table dept(select deptno,deptname from dept where deptno=10) and retrieve list of employee from table emp for that dept in combobox using this query (select ename
How to display all the rows in JSP ,MySQL select condition statement IN dept_table
is displayed.@select * from department where dept_no=10;My display code in JSP...;br><br> <form method="post" name="form"> <table border="1">...); String query = "select * from dept"; st = con.createStatement(); ResultSet rs
Data retrieve from mysql database
Data retrieve from mysql database  Hi sir, please give some example... code retrieves the employee name in the dropdown. When the user selects any name...+"?name="+emp_value xmlHttp.onreadystatechange=stateChanged xmlHttp.open("GET",url
retrieve record from table
retrieve record from table  Hi. I have a field in database named stages. its datatype is varchar(60). It contains values chennai,trichy,kanchipuram for a single record. I have to retrieve these data from the field table. Actually
retrieve the records from one table to another table by using cursors
retrieve the records from one table to another table by using cursors  ... int default 0; declare cur cursor for select name from emp; declare continue... from one table to another table by using cursors.The following is my procedure
Retrieve Value from Table - Hibernate
Retrieve Value from Table   Hai friend, I need help, How can i retrieve values From database using hibernate in web Application. As I new to hibernate I couldn't find solution for this problem.. Can anyone help please.. 
retrieve record from the field table
retrieve record from the field table  Hi. I have a field in database named stages. its datatype is varchar(60). It contains values chennai,trichy,kanchipuram for a single record. I have to retrieve these data from the field table
How to retrieve record from table
How to retrieve record from table  Hi. I have a field in database named stages. its datatype is varchar(60). It contains values chennai,trichy,kanchipuram for a single record. I have to retrieve these data from the field table
retrieve from database........
retrieve from database........  <p>hi i am not able to retrieve...,password); String query = "select * from employee"; st = con.createStatement...", "root", "root"); String query = "select * from employee where id
Select from select list + display
=":"+rs.getString("EMP_NAME")+":"+rs.getString("DEPT_NAME"); } out.println(data...Select from select list + display  i have a select list containing... select EmpCode from the select list, the corresponding EmpName and DeptName should
retrieve data from mysql database
retrieve data from mysql database  hi am not familiar in php.....even though i want to create combobox effectively.... my query is that when i have selected value on combobox which is to be retrieve the relevant data from mysql
combobox
in combo box ,the related employee name will be displayed in text field... i already...; } </script> </head> <body> <form name="employee"> <...(); ResultSet rs=st.executeQuery("select * from employee where id="+id
Retrieve multiple data from database into Table.....
Retrieve multiple data from database into Table.....   hi........... I want to Retrieve multiple data from database into Table but i am not able to.... i am only able to retrieve one value not more than that. means in my
retrieve record from table and show it in HTML
retrieve record from table and show it in HTML  Hi. I have a field...,trichy,kanchipuram for a single record. I have to retrieve these data from the field table. Actually they are separated by comma. I want to take the values
I have to retrieve these data from the field table
I have to retrieve these data from the field table  Hi. I have... chennai,trichy,kanchipuram for a single record. I have to retrieve these data from the field table. Actually they are separated by comma. I want to take the values
HTML & MYSQL - retrieve record from table
HTML & MYSQL - retrieve record from table  Hi. I have a field...,trichy,kanchipuram for a single record. I have to retrieve these data from the field table. Actually they are separated by comma. I want to take the values as single
MYSQL retrieve record from Data table
MYSQL retrieve record from Data table  Hi. I have a field in database...,kanchipuram for a single record. I have to retrieve these data from the field table. Actually they are separated by comma. I want to take the values as single
retrieve data from database with hyperlink
retrieve data from database with hyperlink  sir....i have one table called 'name' having two values i have to retrieve those data with a hyperlink... can i do it..help me sir its urgent.......????? for example-in table 'name' i
Select data from Table in Database
the selected data from table in database. The select query in the database retrieve...; in simple select statement is given below select column name from table... table. select * from table; The select query retrieve all the column present
how to retrieve data from table with runtime values in sql?
how to retrieve data from table with runtime values in sql?  how to retrieve data from table with runtime values in sql? For example, I have table... to execute the command with the dates which I pass. I know how to retrieve a particular
combobox
(" Name cannot be blank"); return; } if( document.kk.phone.value...; <form name="kk" method="POST" action="signup.jsp"> <...; <table border="0" width="100%"> <tr> <td
combobox
(" Name cannot be blank"); return; } if( document.kk.phone.value...; <form name="kk" method="POST" action="signup.jsp"> <...; <table border="0" width="100%"> <tr> <td
retrieve data from database using jsf
retrieve data from database using jsf  Hello I want an example of source code to retrieve data from database i have a database (oracle) name as db1...),, name ,and city I want after enter value in textbox according idauthor i retrieve
Retrieving All Rows from a Database Table
All Rows from a table! Emp_code:   Emp_name: 10 ... string type parameter for executing the SQL statement. SELECT * FROM table_name... Retrieving All Rows from a Database Table   
data should not repeat in the drop down list when it is loading dynamically from database
, `DEPT_NAME` varchar(255) default NULL ); emp CREATE TABLE `emp... = con.createStatement(); ResultSet rs = stmt.executeQuery("Select * from emp where DEPT...;body> <select name='dept' onchange="showEmp(this.value)">
How to retrieve single row from MSSQL
How to retrieve single row from MSSQL  Hello sir, Sir i had created the table in MSSQL,the fields with patient name,pid,Dname(doctor name... the patient name and doc name and search button in GUI window.What i want is after
How to retrieve single row from MSSQL
How to retrieve single row from MSSQL  Hello sir, Sir i had created the table in MSSQL,the fields with patient name,pid,Dname(doctor name... the patient name and doc name and search button in GUI window.What i want is after
How to retrieve single row from MSSQL
How to retrieve single row from MSSQL  Hello sir, Sir i had created the table in MSSQL,the fields with patient name,pid,Dname(doctor name... the patient name and doc name and search button in GUI window.What i want is after
Retrieve data from database by using sql tag of JSTL SQL library
Retrieve data from database by using sql tag of JSTL SQL library... we will see how retrieve data from database using sql query given by user...: Query to create table: CREATE TABLE `employee_master
How to retrieve data by using combo box value in jsp? - JSP-Servlet
click combobox the related student name did not display... On friend gave... table script is below. CREATE TABLE "user" ( "name" character varying(100... Employee Id: Employee Name
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... INCORRECT SQL SYNTAX <html> ..... <body> <% //table
data should not repeat in the drop down list when it is loading dynamically from database
, `DEPT_NAME` varchar(255) default NULL ); emp: CREATE... = con.createStatement(); ResultSet rs = stmt.executeQuery("Select * from emp where DEPT...;/script> </head> <body> <select name='dept
how to retrieve images from database to jsp?
how to retrieve images from database to jsp?  Hi sir,i want to stores images along with the name and price with database and retrieve it on jsp.and...*" %> <HTML> <table border="1"> <tr><th>ID</th>
how we retrieve image from database
how we retrieve image from database  my code is:- $search=$_POST["search"]; $sql="SELECT * FROM search WHERE productname ='$search...;/em&amp;gt;error()); echo "&amp;lt;table border='1'&amp
How to retrieve data from database by using combo box value in jsp? - JSP-Servlet
How to retrieve data from database by using combo box value in jsp?  .... Your code here.. CREATE TABLE "user" ( "name" character varying(100...("emp_id").focus(); alert("Please Select Employee Id"); document.getElementById
how to retrieve data from multiple tables in jsp using javabeans
how to retrieve data from multiple tables in jsp using javabeans   ... for retrieving data fromm two tables : first table having fields: bookid,name... = stmt.executeQuery("select B.book_id,B.name,B.phoneno from booking_table B
how to retrieve data from multiple tables in jsp using javabeans
how to retrieve data from multiple tables in jsp using javabeans   ... for retrieving data fromm two tables : first table having fields: bookid,name... = stmt.executeQuery("select B.book_id,B.name,B.phoneno from booking_table B
how to retrieve data from multiple tables in jsp using javabeans
how to retrieve data from multiple tables in jsp using javabeans   ... for retrieving data fromm two tables : first table having fields: bookid,name... = stmt.executeQuery("select B.book_id,B.name,B.phoneno from booking_table B
Retrieve Data into JTable and export it to Excel File
Java Retrieve Data into JTable and export it to Excel File In this section, you will learn how to retrieve the data from the database in the table and then export it to the Excel file. For this, we have created a table
Getting Column Names from a database table in Java
Getting Column Names from a database table in Java  ... with code that retrieves all columns name in a specific database table. Sometimes... of the table, so you can retrieve it with the help of this example. See detail information
Search from Database In Servlet
;employee_name='"+emp_name+"' or     department='"...="text" name="emp_name" id="emp_name"> <...; <td>: <input type="text" name="emp_dept" id="
How to display all the Select values from the MySQL database table in where condition= In JSP?
in the jsp file. @select * from table dept where dept_no=10;" jsp code i have used...How to display all the Select values from the MySQL database table in where...; <form method="post" name="form"> <table border="1"> <tr><
Retrieving data from table using DBCP
;from a table!\n");     BasicDataSource ...;System.out.println("ID: " + "\t\t" + "NAME...;    String s = res.getString("name"
jdbc odbc
from two tables SELECT * FROM emp e,dept d WHERE e.DEPT_NO = d.DEPT_NO; where emp and dept are the database tables. CREATE TABLE `emp... is foreign key of another in this case how to retrive value from both table and show
Retrieve The Data From MySql Datbase
Retrieve The Data From MySql Datbase   How to Retrieve The Data From MYSQL database TO Use Select the Emp_id Option.And Also Search Option
Retrieve image from database using Servlet
Retrieve image from database using Servlet     ... that connects to the MySQL database and retrieves the image from the table. After... of program to retrieve the employee image in HR application. In case social networking
How to retrieve a field from SQLite to Edittext in android
How to retrieve a field from SQLite to Edittext in android  Hi... Im new to android.. i do no how to retrieve a field from database(SQLite). I'd...; Cursor m=db.rawQuery("SELECT Password FROM "+ USERS_TABLE+"WHERE email
How to retrieve a field from SQLite to Edittext in android
How to retrieve a field from SQLite to Edittext in android  Hi... Im new to android.. i do no how to retrieve a field from database(SQLite). I'd...; Cursor m=db.rawQuery("SELECT Password FROM "+ USERS_TABLE+"WHERE email
Retrieving the Image from a database Table
to retrieve the image from the database table. You can do it very easily after...Retrieving the Image from a database Table Consider a case where we want... from the database table our java program need to make a connection
Retrieve image from mysql database through jsp
Retrieve image from mysql database through jsp... to retrieve image from mysql database through jsp code. First create a database... will be retrieved from database on the basis of  'id' field of the table. So code

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.