Program Urgent

Program Urgent

View Answers

July 23, 2008 at 7:00 PM

Hi friend,

<html>
<head>
<script type="text/javascript">

<!--
function popup(url, name, width, height){
settings=
"toolbar=yes,location=yes,directories=yes,"+
"status=no,menubar=no,scrollbars=yes,"+
"resizable=yes,width="+width+",height="+height;

MyNewWindow=window.open("http://localhost:8080/examples/jsp/"+url,name,settings);
}
//-->
</script>
</head>
<br><br>
<center>
<p>
<body>

<input type="button" onclick="popup('sumcount.jsp', 'Win1', 600, 500)" value="Show New Window">

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

------------------------------------------------------

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

<%

String emp_id = request.getParameter("emp_id").toString();

String data ="";



Connection con = null;
String url = "jdbc:mysql://192.168.10.211:3306/";;
String db = "amar";
String driver = "com.mysql.jdbc.Driver";
String userName ="amar";
String password="amar123";



int sumcount=0;

Statement st;

try {

Class.forName(driver).newInstance();



con = DriverManager.getConnection(url+db,userName,password);

String query = "select * from employee_details where eid='"+emp_id+"'";



st = con.createStatement();

ResultSet rs = st.executeQuery(query);

while(rs.next()){

data = ":" + rs.getString(2) + " " + rs.getString(3) +":"+ emp_id;

}



out.println(data);

}

catch (Exception e) {

e.printStackTrace();

}

%>

--------------------------------

July 23, 2008 at 7:02 PM

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

<html>

<head>

<style>

A:hover {text-decoration: none;



border: 0px;

font-size:14pt;

color: #2d2b2b; }

</style>



<link rel="stylesheet" type="text/css" href="datepicker.css"/>





<script type="text/javascript">

function showEmp(emp_value)

{

if(document.getElementById("emp_id").value!="-1")

{

xmlHttp=GetXmlHttpObject()

if (xmlHttp==null)

{

alert ("Browser does not support HTTP Request")

return

}

var url="getuser.jsp"

url=url+"?emp_id="+emp_value



xmlHttp.onreadystatechange=stateChanged

xmlHttp.open("GET",url,true)

xmlHttp.send(null)



}

else

{

alert("Please Select Employee Id");

}

}



function stateChanged(){

document.getElementById("ename").value ="";

document.getElementById("emp_id").value ="";

if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") {



var showdata = xmlHttp.responseText;

var strar = showdata.split(":");



if(strar.length==1) {

document.getElementById("emp_id").focus();

alert("Please Select Employee Id");

document.getElementById("ename").value =" ";

document.getElementById("emp_id").value =" ";



}

else if(strar.length>1)

{

var strname = strar[1];

document.getElementById("emp_id").value= strar[2];

document.getElementById("ename").value= strar[1];

}

}

}



function GetXmlHttpObject(){

var xmlHttp=null;

try {

// Firefox, Opera 8.0+, Safari

xmlHttp=new XMLHttpRequest();

}

catch (e) {

//Internet Explorer

try {

xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");

}

catch (e) {

xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");

}

}

return xmlHttp;

}

</script>



</head>

July 23, 2008 at 7:06 PM

<body>

<form name="employee">

<br><br>

<table border="0" width="400px" align="center" bgcolor="#CDFFFF">

<div id="mydiv"></div>
<tr><td><b>Select Employee Id</b></td><td>

<select name="semp_id" onchange="showEmp(this.value);">

<option value="-1">Select</option>

<%

Connection con = null;
String url = "jdbc:mysql://192.168.10.211:3306/";;
String db = "amar";
String driver = "com.mysql.jdbc.Driver";
String userName ="amar";
String password="amar123";



int sumcount=0;

Statement st;

try {

Class.forName(driver).newInstance();



con = DriverManager.getConnection(url+db,userName,password);

String query = "select * from employee_details";



st = con.createStatement();

ResultSet rs = st.executeQuery(query);

%>



<%

while(rs.next()){

%>



<option value="<%=rs.getString(1)%>"><%=rs.getString(1)%></option>



<%

}

%>



<%

}

catch (Exception e) {

e.printStackTrace();

}



%>



</select>

</td></tr>



<tr><td ><b>Employee Id:</b></td>
<td><input type="text" name="emp_id" id="emp_id" value=""></td></tr>

<tr><td><b>Employee Name:</b></td>
<td><input type="text" name="emp_name" id="ename" value=""></td></tr>



</table>

</form>



<table border="0" width="100%" align="center">

<br>

<br>

</table>

</body>

</html>

-------------------------------------------------------------------
Read for more information.

http://www.roseindia.net/jsp

Thanks.
Amardeep









Related Tutorials/Questions & Answers:
Program urgent - JSP-Servlet
Program urgent  Respected Sir/Madam, I am R.ragavendran.. Actually my code shows the following output: There is a combo box which... Please please its very urgent.. Thanks/Regards
Program Urgent - JSP-Servlet
Program Urgent  Respected Sir/Madam, I am R.Ragavendran. I am in urgent need of the coding. My requirement is as follows: Beside Enter Employee ID... automatically with the selected Employee ID and Name. Its Very Urgent.. Please send me
Advertisements
Program Very Urgent.. - JSP-Servlet
Program Very Urgent..  Respected Sir/Madam, I am R.Ragavendran.. Thanks for your superb reply. I got the link you sent. But I find a simple problem... its most urgent.. Thanks/Regards, R.Ragavendran..   Hi friend
Need the program urgent veryyyyyyyyyyyyy urgent plsssssssssssssssssss follow the standard in the program
Need the program urgent very urgent please follow the standard in the program  Restaurant Order Management System (ROMS) Problem Case: Create a ROMS system, which is intended to take an order from the customer and charge
Image Program Urgent - JSP-Servlet
Image Program Urgent  Respected Sir/Madam, I am R.Ragavendran.. Actuaaly in the Image Selection coding which is produced below, I am getting the Emp ID in the Emp ID text box but not the exact Emp ID which I have selected
swing program plz urgent sir - Java Beginners
swing program plz urgent sir   hi sir,i waan a jtable swings program table having column names "itemid","price".Initially table having single empty row.whenever we click the "enter" button automatically new row will be insert
Simple Program Very Urgent.. - JSP-Servlet
Simple Program Very Urgent..  Respected Sir/Madam, I am R.Ragavendran.. Thanks for your superb reply. I find a simple problem which i have tried my... coding asap because its most urgent.. Thanks/Regards, R.Ragavendran..  
Program Arrow selection Most Urgent - JSP-Servlet
Program Arrow selection Most Urgent  Respected Sir/Madam, I am R.Ragavendran.. I got your coding which is highly appreciable.. As per my requiremennt,there are image buttons for each row in the database.. But i am
very urgent : Iam unable to code this program plz help me - RMI
very urgent : Iam unable to code this program plz help me  Write a Multi-user chat server and client.  Hi friend, Chat server is a standlone application that is made up the combination of two-application, server
ModuleNotFoundError: No module named 'urgent'
ModuleNotFoundError: No module named 'urgent'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'urgent' How to remove the ModuleNotFoundError: No module named 'urgent'
urgent need
urgent need   Input a line. Count the number of words that start with a capital letter
Urgent requirement
Urgent requirement  I want to implement Autocompletion code for Jcombobox in swing can you please help me out from
Urgent
its urgent - Development process
its urgent  Hi how to write a program in core java , program is searching documents and contents in a existing folder or upload a folder... in a folder.its urgent
Urgent Answer Req
Urgent Answer Req  how to view the file content which is at client side from jsp in java
Urgent: HttpRequest - JSP-Servlet
Urgent: HttpRequest  Hi, I want to send a http Request. Their will be another program which will receice the request process it and send back.... The other program should process it i mean take the request along with 2 given
PLease reply its urgent
PLease reply its urgent   Write a java function that has the signature ââ?¬Å?Public static int clock Inter sections(int hours, int minutes)ââ?¬Â...:minute:second format.   How's that urgent
Urgent Solution required
Urgent Solution required  This is possible to transfer that file from client to server and read that file and view it in JSP. If it is can you send the example. thanks alot in advance   Hi, You can create a JSP file
java linked list urgent!!!
java linked list urgent!!!  Q1. Generate 10 thousand random integers with values in the range between 1 to 100. Q2. Store each randomly generated number into a node and then attach the node to a linked list. The list must
java linked list urgent !!!
java linked list urgent !!!  Q1. Generate 10 thousand random integers with values in the range between 1 to 100. Q2. Store each randomly generated number into a node and then attach the node to a linked list. The list must
java linked list urgent !!!
java linked list urgent !!!  Q1. Generate 10 thousand random integers with values in the range between 1 to 100. Q2. Store each randomly generated number into a node and then attach the node to a linked list. The list must
java linked list urgent !!!
java linked list urgent !!!  Q1. Generate 10 thousand random integers with values in the range between 1 to 100. Q2. Store each randomly generated number into a node and then attach the node to a linked list. The list must
java linked list urgent !!!
java linked list urgent !!!  Q1. Generate 10 thousand random integers with values in the range between 1 to 100. Q2. Store each randomly generated number into a node and then attach the node to a linked list. The list must
java linked list urgent !!!
java linked list urgent !!!  Q1. Generate 10 thousand random integers with values in the range between 1 to 100. Q2. Store each randomly generated number into a node and then attach the node to a linked list. The list must
Please help me urgent...........
Please help me urgent...........  For what kind of a problem would use a Tree Set and not a Tree Map For what kind of a problem would use a Tree Map and not a Tree Set   Hello Friend,ADS_TO_REPLACE_1 If you want
program
program  any program of hotel or school management
Urgent programming assignment
Urgent programming assignment   Hi, I am an Indian student in USA.I have been able to write all the java codes successfully , however this one... the program herewith.It needs to develop a Galaxy? The galaxy has up to 100 stars
program
program  write a javascript program to create a application form with validation
program
program  program of jdbc using ms access for creating table
program
program  write a html program in show table and this word in box
program
program  write a program different between to dates in terms of days in java
urgent please, help!
urgent please, help!  how to make jTable unclickable and have unmovable columns, thanks in advance   import javax.swing.*; import java.awt.*; public class SimpleJTableExample{ public static void main(String[] args
program
program  WAP a java program to form 1/2+3/4+5/6+7/8 series
program
program   Write a program to find the difference between sum of the squares and the square of the sums of n numbers
program
program  write a program reversee a string. input-hi this is roseindia output-roseindia is this hi
program
program  develop a servlet to insert the data in the database from our program in the table stored in the database
program
program   An old-style movie theater has a simple profit program. Each customer pays $5 per ticket. Every performance costs the theater $20, plus $.50 per attendee. Develop the program calculateTotalProfit that consumes
program
program  write a java program to input a no. and print wheather the no. is a special no or not. (special no. are those no whose factorial of the sum of digit of the no is same as the original
program
program  Develop the program calculateCylinderArea, which accepts radius of the cylinder's base disk and its height and computes surface area of the cylinder
program
program  explanation of program on extending thread class   Hi Friend, Please go through the following link:ADS_TO_REPLACE_1 Java Threads Thanks
program
program  Develop a program that computes the distance a boat travels across a river, given the width of the river, the boat's speed perpendicular to the river, and the river's speed. Speed is distance/time, and the Pythagorean
program
program  how to improve programming skills plss tell some tips..i am understanding concepts but unable to write program so,pls give some guideness plsss
Program
Program  a program to prove that default constructor of super class is available to subclass by default. Define a parameterize constructor for super class to store name = â??Tommyâ?? age=â??23â?? and call this constructor
Program
Program  a program to create two classes Commercial and Domestic. Override the method calculatebill() of Commercial class(Rs.8 per unit) into Domestic class(Rs 6 per unit) to compute electricity bill for both classes
program
program  no i want a program that shows how merge sort algorithm works in graphical representations like numbers are taken in circles and computation... in rectangles or circles wat ever it may be. the theme of program is to show algorithm
program
program  . Develop a program that accepts an initial amount of money (called the principal), a simple annual interest rate, and a number of months will compute the balance at the end of that time. Assume that no additional
program
program  Write a JSP Program, which displays a web page containing the name of the Courses, Courses being offered currently, number of students enrolled in each course, new courses to be offered, eligibility criteria for taking
program
program  i want a progra in java to print a sentence in alphabetic order, taking the input from the user.the program should writen without using the array for example : if input= this is a cat then output sould = a cat
program
program  Utopias tax accountants always use programs that compute income taxes even though the tax rate is a solid, never-changing 15%. Define the program calculateTax which determines the tax on the gross pay. Define
program
program  Write a JSP Program, which displays a web page containing two web links one for your profiling and other for the schedule of theory of practical classes of your Batch. When one click on link for getting your profile

Ads