»
AnglaisFran�aisVietnamien

Imprimer - Absolute Popup Box - JavaScriptBank.com

Version compl�te: jsB@nk » Browser » Absolute Popup Box
URL: https://www.javascriptbank.com/absolute-popup-box.html

Absolute Popup Box © JavaScriptBank.comCet popup case n'est pas une véritable fenêtre. Il apparaît à droite sur la page, de se cacher en partie le contenu de la page. Pas besoin de s'inquiéter popup bloquants. Bon pour le bios, la carte du site, et d'autres brèves.

Version compl�te: jsB@nk » Browser » Absolute Popup Box
URL: https://www.javascriptbank.com/absolute-popup-box.html



JavaScript
<script type="text/javascript">// Created by: JTricks.com :: http://www.jtricks.com/function move_box(an, box) {  var cleft = 0;  var ctop = 0;  var obj = an;  while (obj.offsetParent) {    cleft += obj.offsetLeft;    ctop += obj.offsetTop;    obj = obj.offsetParent;  }  box.style.left = cleft + 'px';  ctop += an.offsetHeight + 8;  if (document.body.currentStyle &&    document.body.currentStyle['marginTop']) {    ctop += parseInt(      document.body.currentStyle['marginTop']);  }  box.style.top = ctop + 'px';}function show_hide_box(an, width, height, borderStyle) {  var href = an.href;  var boxdiv = document.getElementById(href);  if (boxdiv != null) {    if (boxdiv.style.display=='none') {      move_box(an, boxdiv);      boxdiv.style.display='block';    } else      boxdiv.style.display='none';    return false;  }  boxdiv = document.createElement('div');  boxdiv.setAttribute('id', href);  boxdiv.style.display = 'block';  boxdiv.style.position = 'absolute';  boxdiv.style.width = width + 'px';  boxdiv.style.height = height + 'px';  boxdiv.style.border = borderStyle;  boxdiv.style.backgroundColor = '#fff';  var contents = document.createElement('iframe');  contents.scrolling = 'no';  contents.frameBorder = '0';  contents.style.width = width + 'px';  contents.style.height = height + 'px';  contents.src = href;  boxdiv.appendChild(contents);  document.body.appendChild(boxdiv);  move_box(an, boxdiv);  return false;}</script><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<a href="popupcontent.html" onClick="return show_hide_box(this,200,270,'2px dotted')">Click here to open popup</a><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->