Very Very Urgent -Image

Very Very Urgent -Image

View Answers

August 19, 2008 at 10:20 AM

Hi friend,

Code to solve your problem

"viewradio.jsp"

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

<HTML>
<head>

</head>
<BODY BGCOLOR="LIGHTYELLOW">
<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('winopenradio1.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> </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>

August 19, 2008 at 10:22 AM

"winopenradio1.jsp"


<%@ page import="java.sql.*" %>
<html>
<head>
<script type="text/javascript">

///// Code chages
var imageURL = "redar.jpg";



function changeImage(img_id) {


var imgs=document.getElementsByTagName('img');
for(var i=1;i<=imgs.length;i++) {



var imgid="myImage"+i;
if(imgid==img_id)
{



document.getElementById(img_id).src="greenar.gif";
}
else
{
document.getElementById(imgid).src=imageURL;
}


}

}

///////////////


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

function validate()
{
///// code chages ////
var emp_value ="";
var count=0;
var imgs=document.getElementsByTagName('img');
for(var i=1;i<=imgs.length;i++) {

var imgid="myImage"+i;

var imgurl = document.getElementById(imgid).src;
var imgar = imgurl.split("/");
if(imgar[3]=="greenar.gif")
{
count++;
}

//////////////////////

}

if(count==0)
{
alert("Please Select Employee Id");
return false;
}
return true;
}


function showEmp()
{

///// code changes /////
if(validate()){
var imgs=document.getElementsByTagName('img');
for(var i=1;i<=imgs.length;i++) {

var imgid="myImage"+i;
var emp_id = "eid"+i;
var imgurl = document.getElementById(imgid).src;
var imgar = imgurl.split("/");
if(imgar[3]=="greenar.gif")
{
var emp_value = document.getElementById(emp_id).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;
// alert(showdata);
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>

August 19, 2008 at 10:23 AM

</head>
<body>
<form name="employee">
<br><br>
<table border="0" width="400px" align="center" bgcolor="#CDFFFF">
<tr><td align="center" colspan=2><b>Select Employee Id</b></td></tr>


<%



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);
%>

<%
int count=0;
while(rs.next())
{
count++;
%>

<tr><td align="center" width="50%">
<input type="hidden" value="<%=rs.getString(1)%>" id="eid<%=count%>">
<img src="redar.jpg" width="25px" height="25px" name="myImage" onclick="changeImage(this.id);" id="myImage<%=count%>" border="0">

<%=rs.getString(1)%></td><td width="50%"><%=rs.getString(2)%></td></tr>

<%
}
%>

<%

}
catch (Exception e) {
e.printStackTrace();
}

%>

<tr><td align="center" width="50%"><input type="button" value="Select" onclick="javascript:showEmp();"</td></tr>


</table>
</form>
</body>
</html>

August 19, 2008 at 10:24 AM

"getuser.jsp"


<%@ page import="java.sql.*" %>
<%
String emp_id = request.getParameter("emp_id").toString();
String data ="";

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 where eid='"+emp_id+"'";

st = conn.createStatement();
ResultSet rs = st.executeQuery(query);
while(rs.next())
{
data = rs.getString(2) + " " + rs.getString(3) +":"+ emp_id;
}


out.println(data.trim());
}
catch (Exception e) {
e.printStackTrace();
}
%>

August 19, 2008 at 10:32 AM


For read more information visit this link...


http://www.roseindia.net/

Thanks









Related Tutorials/Questions & Answers:
very urgent
very urgent  ** how to integrate struts1.3 ,ejb3,mysql5.0 in jboss server with myeclipse IDE
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
Advertisements
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
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
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
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... [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
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
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                   
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
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..  
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
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
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
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
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 on the wall 10 green bottles standing on the wall and if 1 green bottle should
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
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
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 want to write a JPQL Query that show only the Available books and not loaned
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
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
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
Perl and CGI Miscellaneous Very short delay Tutorial
If you want to emulate very short delay in your program, with duration less than 1 second, you should use select function (if your system supports it). Function ussually used to monitor operations on file handles. Syntax
ModuleNotFoundError: No module named 'odoo10-addon-project-task-add-very-high'
ModuleNotFoundError: No module named 'odoo10-addon-project-task-add-very-high...: ModuleNotFoundError: No module named 'odoo10-addon-project-task-add-very-high' How...-add-very-high' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'odoo11-addon-project-task-add-very-high'
ModuleNotFoundError: No module named 'odoo11-addon-project-task-add-very-high...: ModuleNotFoundError: No module named 'odoo11-addon-project-task-add-very-high' How...-add-very-high' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'odoo12-addon-project-task-add-very-high'
ModuleNotFoundError: No module named 'odoo12-addon-project-task-add-very-high...: ModuleNotFoundError: No module named 'odoo12-addon-project-task-add-very-high' How...-add-very-high' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'odoo13-addon-project-task-add-very-high'
ModuleNotFoundError: No module named 'odoo13-addon-project-task-add-very-high...: ModuleNotFoundError: No module named 'odoo13-addon-project-task-add-very-high' How...-add-very-high' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'odoo8-addon-project-task-add-very-high'
ModuleNotFoundError: No module named 'odoo8-addon-project-task-add-very-high...: ModuleNotFoundError: No module named 'odoo8-addon-project-task-add-very-high' How...-very-high' error? Thanks   Hi, In your python environment
ModuleNotFoundError: No module named 'odoo9-addon-project-task-add-very-high'
ModuleNotFoundError: No module named 'odoo9-addon-project-task-add-very-high...: ModuleNotFoundError: No module named 'odoo9-addon-project-task-add-very-high' How...-very-high' error? Thanks   Hi, In your python environment
ModuleNotFoundError: No module named 'very-good-setuptools-git-version'
ModuleNotFoundError: No module named 'very-good-setuptools-git-version' ...: ModuleNotFoundError: No module named 'very-good-setuptools-git-version' How to remove the ModuleNotFoundError: No module named 'very-good-setuptools-git-version'
Can JSP using apachi POI handle the very complicated JSP?
Can JSP using apachi POI handle the very complicated JSP?  Can the following jsp handle the very complicated excel: such as, multiple sheet, tree structure, with chart in the excell file, etc. <%@page import="java.io.*"%>
Urgent
J2ME programming  Hi, J2ME programming - How to learn J2ME Programming very fast? Thank You
why it is very slow when I am using the backend as microsoft access file for running the java webapplication - SQL
why it is very slow when I am using the backend as microsoft access file for running the java webapplication  I am using the backend as microsoft access file for running the java webapplication.it is very slow when twoor mor
i have developed the application in jsp(front-end -jsp,business logic-jsp).it is very slow when accessing the page - JSP-Servlet
i have developed the application in jsp(front-end -jsp,business logic-jsp).it is very slow when accessing the page  i have developed the application in jsp only.i did not use any classes.application is very slow when access
training and placement of my child who is very much interested in doing jobs of his key interests like java, j2ee, php etc,
training and placement of my child who is very much interested in doing jobs of his key interests like java, j2ee, php etc,  I want my son to be trained in java developing ,how should I go

Ads