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



Home Answers Viewqa JSP-Servlet Popup very urgent plz
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Ragavendran.R
Popup very urgent plz
3 Answer(s)      6 years and 6 months ago
Posted in : JSP-Servlet



Advertisement
View Answers

July 25, 2008 at 5:36 PM


Hi firend,

<%@ 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 5:40 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>

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

Thanks

Amardeep


July 25, 2008 at 5:41 PM


Read for more information

http://www.roseindia.net/jsp



Related Tutorials/Questions & Answers:
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
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
Advertisements
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
very urgent
very urgent  ** how to integrate struts1.3 ,ejb3,mysql5.0 in jboss server with myeclipse IDE
Program Very Urgent.. - JSP-Servlet
Program Very Urgent..  Respected Sir/Madam, I am R.Ragavendran.... reference. http://www.roseindia.net/jsp/popup-window-using-ajax-in-jsp.shtml... 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
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
Help Very Very Urgent - JSP-Servlet
requirements.. Please please Its Very very very very very urgent... Thanks...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
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
Download.jsp Urgent plz - JSP-Servlet
Download.jsp Urgent plz  Respected Sir/Madam, I am R.Ragavendran.. I got your coding for download.jsp.. A lot of Thanks... inserted after every upload very successfully.. I am sending the code for your kind
Basic problem but very urgent - JSP-Servlet
Basic problem but very urgent  Respected Sir/Madam, I am... kind reference. http://www.roseindia.net/jsp/popup-window-using-ajax... me the cause of the problem asap because its most urgent.. Thanks/Regards
Simple Program Very Urgent.. - JSP-Servlet
Simple Program Very Urgent..  Respected Sir/Madam, I am...: strar[1]=tahoma,arial,serif;color strar[2]=white;background color Plz Plz check for the above problem in winopenradio.jsp and also plz set the correct value
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
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
JSP,JDBC and HTML(Very Urgent) - JSP-Servlet
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...JSP,JDBC and HTML(Very Urgent)  Respected Sir/Madam, Thanks
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 the values selected in those combo-boxes, for storing in database. in the case
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... deepak@roseindia.net 8888 deepak kumar It is very urgent for me please give
Programming help Very Urgent - JSP-Servlet
Please please its very urgent.. Thanks/Regards, R.Ragavendran..  ...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
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
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
&nbsp;(very urgent) - Design concepts & design patterns
 (very urgent)  hi friends, This is my code in html                   
&nbsp;(very urgent) - Java Server Faces Questions
 (very urgent)  hi friends, This is my code in JSF                    
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 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... Please send me the modified coding as soon as possible plz plz
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
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
I am getting Undefined in Text Box Very Urgent - JSP-Servlet
I am getting Undefined in Text Box Very Urgent  Respected Sir/Madam... Please send me the modified coding as soon as possible plz plz.. Thanks... application. Read for more information. http://www.roseindia.net/jsp/popup-window
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 button to select Emp ID which is getting populated in the text box of my home page
Advertisements
 

 

 

DMCA.com