Hola
Así te resultará mas sencillo
Código Javascript
:
Ver original<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<script type="text/javascript">
window.onload = function () {
ligas = document.getElementById('enlaces').getElementsByTagName('A');
for(i= 0; i < ligas.length; i++) {
ligas[i].onmouseover = prev;
ligas[i].onmouseout = prev;
}
}
function prev(evento){
var evento = evento || window.event;
switch(evento.type) {
case 'mouseover':
window.c=document.createElement('div');
c.style.position='absolute';
var pos=getElementPosition.call(this);
c.style.left=pos.left+150+'px';
c.style.top=pos.top+10+'px';
c.style.padding='2px';
c.style.border='1px solid #000';
c.innerHTML='<iframe width="500" height="300" frameborder="0" allowtransparency="true" src="'+this.href+'" />';
document.body.appendChild(c);
break;
case 'mouseout':
document.body.removeChild(window.c);
window.c=null;
break;
}
}
function getElementPosition() {
var offsetTrail = this;
var offsetLeft = 0;
var offsetTop = 0;
while (offsetTrail) {
offsetLeft += offsetTrail.offsetLeft;
offsetTop += offsetTrail.offsetTop;
offsetTrail = offsetTrail.offsetParent;
}
return {left:offsetLeft, top:offsetTop};
}
</script>
</head>
<body>
<div id="enlaces">
<a id="caricatos" href="http://www.caricatos.net/">caricatos.net</a><br />
<a id="forosweb" href="http://www.forosdelweb.com/">forosdelweb.com</a><br />
<a id="desweb" href="http://www.desarrolloweb.com/">desarrolloweb.com</a>
</div>
</body>
</html>
Suerte
PD:
Espero que no te importe Panino