ToolTip Code

ToolTip Code

Dear Sir,
One more question i have.In my web page many students' roll number are there.I want to dispaly student's information just after placing the mouse on that roll number.(Details like-age,sex.location.)Only by placing,not by clicking.No new page should open.I heard ki Tooltip can be used as bookmyshow and yatra.com web sites are using to show flight details only by placing the mouse on that flight number.Can you pliz give me the code and how to use.If function is used in the bean,pliz give me..

Regards
Debasis
View Answers

July 19, 2010 at 1:00 PM

Hi Friend,

Try the following code:

<%@page import="java.sql.*"%>
<script type="text/javascript">
function show(item,name,address,age,gender){
hp = document.getElementById("div");
hp.innerHTML = "Name: "+name+"<br>Address: "+address+"<br>Age: "+age+"<br>Gender: "+gender;
hp.style.top = item.offsetTop + 18;
hp.style.left = item.offsetLeft + 20;
hp.style.visibility = "Visible";
}
function hide(){
hp = document.getElementById("div");
hp.style.visibility = "Hidden";
}
</script>
<body onload="hide();">
<table >
<%
Class.forName("com.mysql.jdbc.Driver").newInstance();
Connection connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/test","root";, "root");
Statement st=connection.createStatement();
ResultSet rs=st.executeQuery("select * from student");

while(rs.next()){
String roll=rs.getString("rollNo");
String name=rs.getString("name");
String address=rs.getString("address");
String age=rs.getString("age");
String gen=rs.getString("gender");

%>
<tr><td style="cursor:default;" onMouseOver="show(this,'<%=name%>','<%=address%>','<%=age%>','<%=gen%>');" onMouseOut="hide();"><%=roll%><div id="div" style="border: 2px solid rgb(0, 0, 0); width: 250px; height: 100px;background-color:blue;visibility:hidden; position:absolute; top:0; left:0;"></div></td>
</tr>
<%
}%>
</table>
</body>

For the above code, we have created a table 'student':

CREATE TABLE `student` (
`rollNo` bigint(40) NOT NULL auto_increment,
`name` varchar(40) default NULL,
`address` varchar(20) default NULL,
`age` int(40) default NULL,
`gender` varchar(10) default NULL,
PRIMARY KEY (`rollNo`)
)

Thanks











Related Tutorials/Questions & Answers:
ToolTip Code - Design concepts & design patterns
ToolTip Code  Dear Sir, One more question i have.In my web...)Only by placing,not by clicking.No new page should open.I heard ki Tooltip can... only by placing the mouse on that flight number.Can you pliz give me the code
ToolTip Code - Design concepts & design patterns
ToolTip Code  Dear Sir, One more question i have.In my web page many... by placing,not by clicking.No new page should open.I heard ki Tooltip can be used... by placing the mouse on that flight number.Can you pliz give me the code and how
Advertisements
Tooltip alignment
Tooltip alignment  Dear Sir, I have a code given below,which gived tooltip design.But,in one table i am getting three students' information.On... near the student's roll number.My code to show the tooltip is given below
Tooltip Alignment
Tooltip Alignment  Dear Sir, I have a code given below,which gived tooltip design.But,in one table i am getting three students' information.On... near the student's roll number.My code to show the tooltip is given below
ToolTip in Flex4
ToolTip in Flex4: ToolTip is used for display the message. When user moves a mouse towards a component a message will appear it is a ToolTip and user clicks the mouse button the message disappears. You can set the one ToolTip
Version of com.coderhour>tooltip dependency
List of Version of com.coderhour>tooltip dependency
tooltip problem - Swing AWT
tooltip problem  Hi All, I am using SWT_AWT bridge in my code... Composite. My problem is that I am unable to see the tooltip for this button even... in advance.   Hi friend, Code to help in solving the program
Maven Dependency tooltip >> 1.3
You should include the dependency code given in this page to add Maven Dependency of com.coderhour >> tooltip version1.3 in your project
Maven Dependency tooltip >> 1.2
You should include the dependency code given in this page to add Maven Dependency of com.coderhour >> tooltip version1.2 in your project
Tooltip problem - JSP-Servlet
Tooltip problem  In my project i used google map...I want show tooltip on marker when marker created not on marker event like mouseover,click
jsf custom tooltip
jsf custom tooltip  I wants to know that is it possible to add a tooltip to the Custom JSF
Flex Simple ToolTip
Flex ToolTip:- The Flex ToolTip are a mechanism (method) to give the useful information to the user. Flex ToolTip are display information when a user moves... , ToolTip are appear and after click that particular component, ToolTip
ToolTip in IE6 for dropdown
ToolTip in IE6 for dropdown  Hi Can any one tell me how to apply Tool tip in drop down tag in IE6 ?? Thanks
Flex ToolTip Style and StyleManager
have set width for ToolTip that's init() method. Running this code after...Set ToolTip Style In Flex:- We discuss about how to set 'Style' for the tooltip in Flex with the help of <mx:Style> Tag. In this tutorial you
ModuleNotFoundError: No module named 'pyside-tooltip'
ModuleNotFoundError: No module named 'pyside-tooltip'  Hi, My... named 'pyside-tooltip' How to remove the ModuleNotFoundError: No module named 'pyside-tooltip' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'js.jquery_tooltip'
ModuleNotFoundError: No module named 'js.jquery_tooltip'  Hi, My... named 'js.jquery_tooltip' How to remove the ModuleNotFoundError: No module named 'js.jquery_tooltip' error? Thanks   Hi, In your
ToolTip style in Flex4
ToolTip style in Flex4: In this example you can see how we can change the style of ToolTip. In this example we use a internal style sheet for change the style of ToolTip. Example: <?xml version="1.0" encoding
Bar Chart using JSP and tooltip to be implemented
Bar Chart using JSP and tooltip to be implemented  Hi Deepak, I have generated a bar chart in JSP using JFreeCharts but I could not get the tool tip for that. Please any one suggest me how to do that or provide some code. Help
Flex ToolTip with TabBar and ToolTipManager
about ToolTip with TabBar controls. You can see how to use tooltip in TabBar controls. TabBar class support ToolTip their data providers. In the following example...;)" toolTip="It is a beautiful flower"/> </mx:Canvas>
Create ToolTip Text in SWT
Create ToolTip Text in SWT       In this section, you will learn how to create ToolTip. The ToolTip is the element of graphical user interface used in the conjunction
jQuery tooltip
What is tooltip ? A tooltip is help box or text that appears when you rollover... attribute of an image tag will be displayed as a tooltip by a browser when you rollover... to every image and hyperlink. Getting Started with jquery tooltip:ADS_TO_REPLACE_1
Maven Repository/Dependency: com.coderhour | tooltip
Maven Repository/Dependency of Group ID com.coderhour and Artifact ID tooltip. Latest version of com.coderhour:tooltip dependencies. # Version Release Date 1 1.2 10
ToolTip Effect in Flex4
ToolTip Effect in Flex4: In this example you can see how we can use the effect with tooltip. You can provide the effect to the tooltip by using...://ns.adobe.com/flex/mx"; mx|ToolTip{ font-family:Verdana;ADS_TO_REPLACE_4
Maven dependency for com.coderhour - tooltip version 1.3 is released. Learn to use tooltip version 1.3 in Maven based Java projects
is the maven dependency code that downloads and includes  com.coderhour - tooltip...: 'com.coderhour', name: 'tooltip', version: '1.3' Above code will enable the Gradle...Maven dependency for  com.coderhour  - Version 1.3 of tooltip
Maven dependency for com.coderhour - tooltip version 1.2 is released. Learn to use tooltip version 1.2 in Maven based Java projects
is the maven dependency code that downloads and includes  com.coderhour - tooltip...: 'com.coderhour', name: 'tooltip', version: '1.2' Above code will enable the Gradle...Maven dependency for  com.coderhour  - Version 1.2 of tooltip
ToolTip style using styleManager in Flex4
ToolTip style using styleManager in Flex4: In this example you can see how we can change the style of ToolTip. In this example we use a styleManager for change the style of ToolTip. Example: <?xml version="1.0
ToolTip with ViewStack in Flex4
ToolTip with ViewStack in Flex4: In this example you can see how we can use the tooltip with ViewStack container. You will use ToolTips on child elements...;library://ns.adobe.com/flex/mx"; mx|ToolTip{ADS_TO_REPLACE_3 font-family
ModuleNotFoundError: No module named 'odoo12-addon-web-tree-image-tooltip'
ModuleNotFoundError: No module named 'odoo12-addon-web-tree-image-tooltip' ...: ModuleNotFoundError: No module named 'odoo12-addon-web-tree-image-tooltip' How to remove...-tooltip' error? Thanks   Hi, In your python environment you have
Code
Code  code for connecting c lang to database
code
code    how to write this in java
code
code  code for android sample program
code for this is
code for this is  a b c d c b a a b c c b a a b b a a a code
code
code  please provide code for custom tags.by using currdate tag we need to get current date?please give me code
code
code   hi I need help in creating a java code that reminds user on a particular date about their festival. i have no clue of how to do it.. am looking forward to seek help from you
code
the correct code for a program.The output of the program is listed below...: {Block 5} ADDRESS-3: {San Juan} POST CODE:{6745} ENTER CODE (XX TO stop) CODE:{FF1} QUANTITY:{2} CODE:{TR4} QUANTITY:{1} CODE:XX INVOICE FOR YOUR ORDER Harry
code
code to create the RMI client on the local machine: import java.rmi.*; public... : "+e); } } } However, when the preceding code is executed it results... the correct code
code
code  i have four textboxes.whenever i click on up,down,left or down arrows then the cursor move to another textbox based on the key pressed.i want code for this in javascript
code
line of code to print the amount he should be paid as allowance
code
code  write a program to encrypt and decrypt the cipher text "adfgvx"   Hi Friend, Try the following code:ADS_TO_REPLACE_1 import java.security.*; import javax.crypto.*; import javax.crypto.spec.*; import
this is the code
code
Code
code
code
JAVA code For
JAVA code For   JAVA code For "Traffic signals Identification for vehicles
example code
example code  code for displaying a list from another class on a midlet
stegnography code
stegnography code  code for the digital stegnographic technique for the encryption and decryption of image
jsp code
jsp code  what are the jsp code for view page in online journal
c code
c code  c code for this formula x=(y-0.22z-072)4; where y=7.32 x=3.1 then ans x=23.9 end code for this   c code for this formula x=(y-0.22z-072)4; where y=7.32 x=3.1 then ans x=23.9 can any one end code
Source code
Source code  source code of html to create a user login page

Ads