Pogledajte određenu poruku
Staro 11. 02. 2006.   #14
bojan_bozovic
expert
Master
 
Avatar bojan_bozovic
 
Datum učlanjenja: 20.12.2005
Poruke: 730
Hvala: 0
0 "Hvala" u 0 poruka
bojan_bozovic is on a distinguished road
Wink

Citat:
Originalno napisao noviKorisnik
Pa mogu da se potpišem ako treba :-) - to makar znam ...
Odlicno, to cemo i uraditi.

@bluesman

Here it comes...

Kôd:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>popup test</title>
<script type="text/javascript">
/* copyright (C) 2006
Bojan Bozovic (http://maestitia.net/)
Dejan Katasic (http://korisnik.blog.hr/)
:) */
function show_popup(e) {
var evt=e;
var tekst=document.createTextNode(this.title);
if (typeof (e) != 'object') evt = event;
var popup=document.getElementById('popup');
var x,y;
if (self.pageYOffset) // all except Explorer
{
x = self.pageXOffset;
y = self.pageYOffset;
}
else if (document.documentElement && document.documentElement.scrollTop)
// Explorer 6 Strict
{
x = document.documentElement.scrollLeft;
y = document.documentElement.scrollTop;
}
else if (document.body) // all other Explorers
{
x = document.body.scrollLeft;
y = document.body.scrollTop;
}
popup.appendChild(tekst);
this.title="";
popup.style.visibility="visible";
popup.style.top=y+evt.clientY+10+"px";
popup.style.left=x+evt.clientX+10+"px";
}
function hide_popup() {
var popup=document.getElementById("popup");
this.title=popup.innerHTML;
popup.innerHTML="";
popup.style.visibility="hidden";
}
function init(){ 
document.body.innerHTML=document.body.innerHTML+"<div class='popup' id='popup'></div>";
var links = document.getElementsByTagName('a');
  for (var i = 0; i < links.length; i++) {
    if (links[i].title!="") {
     links[i].onmousemove=show_popup; 
     links[i].onmouseover=show_popup;
     links[i].onmouseout=hide_popup;
    }
  }
}
</script>
<style type="text/css">
div.popup {
color:white;
background:black;
border:1px solid red;
position:absolute;
visibility:hidden;
}
</style>
<body onload="init()">
<p>
<a title="DPT Forums" href="http://www.devprotalk.com">DPT</a>
</p>
</body>
</html>

Poslednja izmena od bojan_bozovic : 11. 02. 2006. u 03:25.
bojan_bozovic je offline   Odgovorite uz citat