Help Very Very Urgent

Help Very Very Urgent

View Answers

July 25, 2008 at 6:15 PM

Hi friend,

<%@ page language="java" %>

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

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



<HTML>

<head>



</head>

<BODY BGCOLOR="LIGHTYELLOW">

<%

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

//Connection con=DriverManager.getConnection("jdbc:odbc:Employee","","");

Statement stmt=null;

%>

<FORM NAME="form" METHOD="GET" ACTION="process.jsp">





<H3> <P ALIGN="CENTER"> <FONT SIZE=6> EMPLOYEE DETAILS </FONT> </P> </H3> </BR> </BR>

<BR>

<BR>

<TABLE CELLSPACING=5 CELLPADDING=5 BGCOLOR="LIGHTBLUE" COLSPAN=2 ROWSPAN=2 ALIGN="CENTER">

<TR>

<TD> <FONT SIZE=5> Enter Employee ID </TD> <TD> <INPUT TYPE="TEXT" NAME="id" id="emp_id"> </TD> <TD> <INPUT TYPE="button" NAME="s1" VALUE="View Database" onClick="window.open('winopen.jsp','mywindow','width=500,height=350,toolbar=no,resizable=yes,menubar=yes')">

</FONT> </TD>

</TR>

<TR>

<TD> <FONT SIZE=5> Enter Employee Name </TD>

<TD><INPUT TYPE="TEXT" NAME="name" id="emp_name">

</FONT> </TD>

</TR>

<TR>

<TD> <FONT SIZE=5> Enter New Name (For UPDATE only) </TD>

<TD><INPUT TYPE="TEXT" NAME="nname"> </FONT> </TD>

</FONT> </TR>

<TR> <FONT SIZE=6>

<TD> <INPUT TYPE="SUBMIT" NAME="s1" VALUE="Insert">

<INPUT TYPE="SUBMIT" NAME="s1" VALUE="Delete">

<INPUT TYPE="SUBMIT" NAME="s1" VALUE="Update">

<INPUT TYPE="SUBMIT" NAME="s1" VALUE="Query"> </TD>

</TR> </FONT>

<%

if(session.getAttribute("empcode") !=null && session.getAttribute("empname") !=null) { %>

<script language="javascript">

document.getElementById('id').value=<%=session.getAttribute("empcode").toString()%>

document.getElementById('name').value='<%=session.getAttribute("empname").toString()%>'

</script>

<%

session.removeAttribute("empcode");

session.removeAttribute("empname");

}



%>

</FORM>

</BODY>

</HTML>

July 25, 2008 at 6:16 PM

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

<html>

<head>

<script type="text/javascript">

function trim(stringToTrim) {

return stringToTrim.replace(/^\s+|\s+$/g,"");

}

function showEmp(emp_value)

{







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)





}



function stateChanged()

{





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

{



var showdata = xmlHttp.responseText;

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



if(strar.length>0)

{

window.opener.location.reload();

window.location.reload();

window.close();

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

opener.document.getElementById("emp_name").value=strar[0];

window.close();

}

}

}



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>

<body>

<form name="employee">

<br><br>

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

<tr><td align="center"><b>Select Employee Id</b></td></tr>

<tr><td align="center">

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

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

<%







Connection conn = null;

String url = "jdbc:mysql://localhost:3306/";;

String dbName = "user_register";

String driver = "com.mysql.jdbc.Driver";

String userName = "root";

String password = "root";



int sumcount=0;

Statement st;

try {

Class.forName(driver).newInstance();



conn = DriverManager.getConnection(url+dbName,userName,password);

String query = "select * from employee_details";



st = conn.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>

</table>

</body>

</html>

------------------------------------------------------
Read for more information,

http://www.roseindia.net/jsp/

Thanks.

July 25, 2008 at 6:17 PM

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

<html>

<head>

<script type="text/javascript">

function trim(stringToTrim) {

return stringToTrim.replace(/^\s+|\s+$/g,"");

}

function showEmp(emp_value)

{







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)





}



function stateChanged()

{





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

{



var showdata = xmlHttp.responseText;

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



if(strar.length>0)

{

window.opener.location.reload();

window.location.reload();

window.close();

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

opener.document.getElementById("emp_name").value=strar[0];

window.close();

}

}

}



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>

<body>

<form name="employee">

<br><br>

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

<tr><td align="center"><b>Select Employee Id</b></td></tr>

<tr><td align="center">

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

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

<%







Connection conn = null;

String url = "jdbc:mysql://localhost:3306/";;

String dbName = "user_register";

String driver = "com.mysql.jdbc.Driver";

String userName = "root";

String password = "root";



int sumcount=0;

Statement st;

try {

Class.forName(driver).newInstance();



conn = DriverManager.getConnection(url+dbName,userName,password);

String query = "select * from employee_details";



st = conn.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>

</table>

</body>

</html>

------------------------------------------------------
Read for more information,

http://www.roseindia.net/jsp/

Thanks.









Related Tutorials/Questions & Answers:
Help Very Very Urgent - JSP-Servlet
Help Very Very Urgent  Respected Sir/Madam, I am sorry..Actually the link u have sent was not my actual requirement.. So,I send my requirement... requirements.. Please please Its Very very very very very urgent... Thanks
Ple help me its very urgent
Ple help me its very urgent  Hi.. I have one string 1)'2,3,4' i want do like this '2','3','4' ple help me very urgent
Advertisements
its very urgent please help me
its very urgent please help me  how can i retrieve all images from ms access database and display in jsp pages
very urgent
very urgent  ** how to integrate struts1.3 ,ejb3,mysql5.0 in jboss server with myeclipse IDE
Programming help Very Urgent - JSP-Servlet
Programming help Very Urgent  Respected Sir/Madam, Actually my code shows the following output: There is a combo box which contains all the ID's... Please please its very urgent.. Thanks/Regards, R.Ragavendran..  
Please help me... its very urgent
Please help me... its very urgent  Please send me a java code to check whether INNODB is installed in mysql... If it is there, then we need to calculate the number of disks used by mysql
plz help -java project very urgent
plz help -java project very urgent  ? Ford furniture is a local furniture store in acts, and they as CS graduate students to implement a software system to generate various reports for them at the end of each month. You
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
Pop up Very Very Urgent - JSP-Servlet
='' Its Very Urgent.. Please send me the coding asap.. Thanks...Pop up Very Very Urgent  Respected Sir/Madam, I am R.Ragavendran.. I got your reply.. Thank you very much for the response. Now I am sending
Very Very Urgent -Image - JSP-Servlet
Very Very Urgent -Image  Respected Sir/Madam, I am... with some coding, its better.. PLEASE SEND ME THE CODING ASAP BECAUSE ITS VERY VERY URGENT.. Thanks/Regards, R.Ragavendran...  Hi friend, Code
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
JSP and AJAX- very urgent - Ajax
Plz its very very Urgent.. Regards, Ragavendran...JSP and AJAX- very urgent  Respected Sir/Madam, I am Ragavendran.. I have a simple doubt.. At present, I am in a module of the project
JSP and AJAX very urgent - Ajax
JSP and AJAX very urgent  Hi Team, This is Ragavendran.R.. I have a very basic doubt in AJAX. While Using AJAX, of course, there will be tag involved in JSP page. But in my current project, I am using too many tags
very important - Kindly help
very important - Kindly help   I am creating web page for form registration to my department ..I have to Reprint the Application Form (i.e Download the PDf File from the Database ) , when the user gives the Application number
very urgent, want to submit my project on monday
very urgent, want to submit my project on monday  i have the code for connected combo-boxes(jsp). But the thing i want to know is, how to access... combobox (state). When i'm using 'state' i'm getting null value...help me..please
JSP,JDBC and HTML(Very Urgent) - JSP-Servlet
JSP,JDBC and HTML(Very Urgent)  Respected Sir/Madam, Thanks... exact requirement in which if I get an immediate help,I will be very much grateful to ROSEINDIA team.. This is Very Urgent. Plz Plz send me the coding ASAP
very urgent - Java Server Faces Questions
check it once and give me a correct solution. It is very urgent for me. Thanks...very urgent  Hi sir, yesterday i send total my code to find where i have done mistake ,you send a reply for that also but in that you told remove
very urgent - Java Server Faces Questions
very urgent  Hi sir, see my code and please tell me mistake. it is very urgent for me. here is my code: addmin.jsp: Users... [email protected] 8888 deepak kumar It is very urgent for me please give
Basic problem but very urgent - JSP-Servlet
Basic problem but 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... me the cause of the problem asap because its most urgent.. Thanks/Regards
Popup very urgent plz - JSP-Servlet
Popup very urgent plz  Respected Sir/Madam, I am R.Ragavendran.. I got your reply.. Thank you very much for the response. Now I am sending the code...='' Its Very Urgent.. Please send me the coding asap.. Thanks/Regards
&nbsp;(very urgent) - Java Server Faces Questions
 (very urgent)  hi friends, This is my code in JSF                    
&nbsp;(very urgent) - Design concepts & design patterns
 (very urgent)  hi friends, This is my code in html                   
Radio Buttons in DB Very Urgent - JSP-Servlet
Very Urgent.. Please send...Radio Buttons in DB Very Urgent  Respected Sir/Madam, I am R.Ragavendran.. I got your reply.. Thank you very much for the response. Now I am sending
Validating Number Very Urgent - JSP-Servlet
Validating Number Very Urgent  Respected Sir/Madam, I am...('id').value= document.getElementById('name').value='' Its Very Urgent.. Please send me the coding asap.. Thanks/Regards, R.Ragavendran.. 
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..  
Very urgent Image Selection - JSP-Servlet
Very urgent Image Selection  Respected Sir/Madam, I am R.Ragavendran.. If you are telling that your coding works fine, then can u plz tell me or send me the output of the following code asap? var imageURL
very urgent - Design concepts & design patterns
very urgent  Hi friends, I have a page layout with a menu on the left, the menu looks perfect in my personal system but the spacing and the rollover effect is all messed up in server system. How can i fix this : I only have
Simple problem Very Urgent - JSP-Servlet
Simple problem Very Urgent  Respected SDir/Madam, I am R.ragavendran.. Thanks for your superb reply. I got the coding. But I find a simple problem which i hava tried my level best to solve. A pop up window is opening
Image selection instead of radio button very urgent.. - JSP-Servlet
Image selection instead of radio button very urgent..  Respected Sir/Madam, I am R.Ragavendran.. Actually in the following using radio... kind reference and hope roseindia team will help me in this regard. Here's
I am getting Undefined in Text Box Very Urgent - JSP-Servlet
I am getting Undefined in Text Box Very Urgent  Respected Sir/Madam, I am R.Ragavendran.. Thanks for your superb reply. I got the coding. But I find a simple problem which i hava tried my level best to solve. A pop up window
Very new to Java
Very new to Java   hi I am pretty new to java and am wanting to create a programe for the rhyme 10 green bottles. 10 green bottles standing... actually help me with this that would be great
JPQL helpppppp please very important
JPQL helpppppp please very important   there are 3 tables: book: isbn title loan: isbn borrowerId borrower: borrowerId FirstName LastName I... by anyone Could anyone help me help me please with the Query
ModuleNotFoundError: No module named 'very-plot'
ModuleNotFoundError: No module named 'very-plot'  Hi, My Python... 'very-plot' How to remove the ModuleNotFoundError: No module named 'very... have to install padas library. You can install very-plot python with following
ModuleNotFoundError: No module named 'Very-SimpleXML'
ModuleNotFoundError: No module named 'Very-SimpleXML'  Hi, My... named 'Very-SimpleXML' How to remove the ModuleNotFoundError: No module named 'Very-SimpleXML' error? Thanks   Hi, In your python
Java programming tutorial for very beginners
Java programming tutorial for very beginners  Hi, After completing my 12th Standard in India I would like to learn Java programming language. Is there any Java programming tutorial for very beginners? Thanks   Hi
Very Big Problem - Java Beginners
Very Big Problem  Write a 'for' loop to input the current meter reading and the previous meter reading and calculate the electic bill with the following conditions(all must be fulfilled in one class only): (i)if unit(current
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
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
pls help me it urgent
pls help me it urgent  hey, pls help me i want to know that can we call java/.bat file from plsql/proceudre /trigger
pls help me it urgent
pls help me it urgent  hey, pls help me i want to know that can we call java/.bat file from plsql/proceudre /trigger
pls help me it urgent
pls help me it urgent  hey, pls help me i want to know that can we call java/.bat file from plsql/proceudre /trigger
urgent help needed!!!!
....please help me.... 1)state.jsp: <%@page import="java.sql.*"%>
urgent help needed!!!!
access country and state....please help me.... 1)state.jsp: <%@page import
urgent...pleAse help me.....please!
urgent...pleAse help me.....please!  please help me urgent! how can i do dictionary with the use of array code in java, where i will type the word then the corresponding meaning for that word will appear...thanks
Programming Help URGENT - JSP-Servlet
Programming Help URGENT  Respected Sir/Madam, I am R.Ragavendran. I am in urgent need of the coding. My requirement is as follows: Beside... URGENT
ModuleNotFoundError: No module named 'very-basic-sql-builder'
ModuleNotFoundError: No module named 'very-basic-sql-builder'  Hi...: No module named 'very-basic-sql-builder' How to remove the ModuleNotFoundError: No module named 'very-basic-sql-builder' error? Thanks   Hi
Need urgent help with C++ errors!
Need urgent help with C++ errors!  hi, i'm new to C++ programming... don't know what to do. Please help!! #include<iostream.h> void main... help
Why Dose Hibernate Run Very Slow?
Why Dose Hibernate Run Very Slow?  I use Hibernate in netbean 6.9.1, when I run by F6 of netbean, Hibernate run very slow, it run some row INFO.... in GlassFish of netbean, web of me run very slow. I have configure Hibernate
Answer me ASAP, Thanks, very important
Answer me ASAP, Thanks, very important  Sir, how to fix this problem in mysql i have an error of "Too many connections" message from Mysql server,, ASAP please...Thanks in Advance
The second Question is very tuff for me - Java Beginners
The second Question is very tuff for me   You are to choose between two procedures, both of which compute the mini-mum value in an array of integers. One procedure returns the smallest integer if its array argument is empty

Ads