Search this site!

Return to the CSB Support home page
Pop Up 1   |   Pop Up 2   |   Pop Up 3   |   Pop Up 4   |   Pop Up 5   |   Pop Up 6   |   Pop Up 7   |   Pop Up 8
Pop Up 5
LinkablesS
Description:
This is based on the Popup Information Box II found on Dynamic Drive and will allow a pop up description box to appear for a specific link
How to use:
1. Dynamic Drive gives you two separate scripts (one for the HEAD, and one for the BODY, sections of an HTML page.  I've combined them into one script, and therefore one Build your own web gem (BYOWG).  Simply cut and paste the code found in the file popinfo2.txt

2. They (Dynamic Drive) then give you a piece of sample code that you would need to use to create your link. Here is the format of that code:

ONMOUSEOVER="popup('Link description here','yellow')"; ONMOUSEOUT="kill()"

This code would bave to be customized and inserted into separate BYOWGs, one for each line you wanted to do this way.  So for instance if we wanted to create a link back to the Trellix Cafe, the HTML code to be placed in the BYOWG might look like this:

<a href="http://wsabstract.com" ONMOUSEOVER="popup('Website Abstraction, the definitive JavaScript site on the net.','lightgreen')"; ONMOUSEOUT="kill()">Website Abstraction</a>

Example:
Hover your mouse over any of the links and see what happens!
Download the code
right click on link, then click on 'Save target (or frame) as'


Other information:
A version of the script also appears in Dynamic Drive's web site: www.dynamicdrive.com

Source code:

<STYLE TYPE="text/css">
<!--
#dek {POSITION:absolute;VISIBILITY:hidden;Z-INDEX:200;}
//-->
</STYLE>

<DIV ID="dek"></DIV>

<SCRIPT TYPE="text/javascript">
<!--

//Pop up information box II (Mike McGrath (mike_mcgrath@lineone.net,  http://website.lineone.net/~mike_mcgrath))
//Permission granted to Dynamicdrive.com to include script in archive
//For this and 100's more DHTML scripts, visit http://dynamicdrive.com

Xoffset=-60;    // modify these values to ...
Yoffset= 20;    // change the popup position.

var old,skn,iex=(document.all),yyy=-1000;

var ns4=document.layers
var ns6=document.getElementById&&!document.all
var ie4=document.all

if (ns4)
skn=document.dek
else if (ns6)
skn=document.getElementById("dek").style
else if (ie4)
skn=document.all.dek.style
if(ns4)document.captureEvents(Event.MOUSEMOVE);
else{
skn.visibility="visible"
skn.display="none"
}
document.onmousemove=get_mouse;

function popup(msg,bak){
var content="<TABLE  WIDTH=150 BORDER=1 BORDERCOLOR=black CELLPADDING=2 CELLSPACING=0 "+
"BGCOLOR="+bak+"><TD ALIGN=center><FONT COLOR=black SIZE=2>"+msg+"</FONT></TD></TABLE>";
yyy=Yoffset;
 if(ns4){skn.document.write(content);skn.document.close();skn.visibility="visible"}
 if(ns6){document.getElementById("dek").innerHTML=content;skn.display=''}
 if(ie4){document.all("dek").innerHTML=content;skn.display=''}
}

function get_mouse(e){
var x=(ns4||ns6)?e.pageX:event.x+document.body.scrollLeft;
skn.left=x+Xoffset;
var y=(ns4||ns6)?e.pageY:event.y+document.body.scrollTop;
skn.top=y+yyy;
}

function kill(){
yyy=-1000;
if(ns4){skn.visibility="hidden";}
else if (ns6||ie4)
skn.display="none"
}

//-->
</SCRIPT>