Total members 11893 |It is currently Tue Nov 05, 2024 5:36 am Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka





Popup message using javascript when mouse is over a text content without using alert function.
javascript code
<html>
<head>
<title>
Popup message using javascript
</title>

<style type="text/css">
.boxpopup {
font-family:Arial,sans-serif;
text-align:center;
color:black; background:#89FFFF;
width:300px;
padding:5px 6px 5px 6px;
font-weight:bold;
border:1px dashed gray;
font-size:90%;
}
#boxTail {position:absolute; visibility:hidden; z-index:200;}

</style>
</head>


<body>
<div id="boxTail"></div>
<script TYPE="text/javascript">
paddingPOPX=-135;
paddingPOPY=25;
var skn,iex=(document.all),shiftPosition=-1000;
var ns4=document.layers
var ns6=document.getElementById&&!document.all
var ie4=document.all
if (ns4) myPOPCP=document.boxTail
else if (ns6) myPOPCP=document.getElementById("boxTail").style
else if (ie4) myPOPCP=document.all.boxTail.style
if (ns4) document.captureEvents(Event.MOUSEMOVE);
else {
myPOPCP.visibility="visible"
myPOPCP.display="none"
}
document.onmousemove=get_mouse;
function showPopup(content){
var content="<div class=boxpopup>"+content+"</div>";
shiftPosition=paddingPOPY;
if(ns4){myPOPCP.document.write(content);myPOPCP.document.close();myPOPCP.visibility="visible"}
if(ns6){document.getElementById("boxTail").innerHTML=content;myPOPCP.display=''}
if(ie4){document.all("boxTail").innerHTML=content;myPOPCP.display=''}
}
function get_mouse(e){
var x=(ns4||ns6)?e.pageX:event.x+document.body.scrollLeft;
myPOPCP.left=x+paddingPOPX;
var y=(ns4||ns6)?e.pageY:event.y+document.body.scrollTop;
myPOPCP.top=y+shiftPosition;
}
function remove_popup(){
shiftPosition=-1000;
if(ns4){myPOPCP.visibility="hidden";}
else if (ns6||ie4)
myPOPCP.display="none"
}
//-->
</script>

<p align=center>
<a href="/" alt="" onMouseOver="javascript:showPopup('Popup message Here ');";
onMouseOut="remove_popup()">Your user content here. Your user content here. Your user content here.</a>
</p>
</body>


</html>




_________________
M. S. Rakha, Ph.D.
Queen's University
Canada


Author:
Mastermind
User avatar Posts: 2715
Have thanks: 74 time
Post new topic Reply to topic  [ 1 post ] 

  Related Posts  to : Popup message using JavaScript without using alert function
 Popup message without using javascript     -  
 Need help with JavaScript function calculate the total pric!     -  
 Document Object Write Function in JavaScript     -  
 Get job’s Alert In Your Inbox     -  
 displaying alert box in html     -  
 Show popup dialog using JQuery     -  
 Choice choiceList popup list of choices     -  
 JMS Message Consumer Example     -  
 Trace soap message     -  
 Java message service(JMS)     -  



Topic Tags

JavaScript Functions






Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com