»
EnglishFrenchVietnamese

Print - Newsscroller with show-and-hide-feature onMouseDoubleClick - JavaScriptBank.com

Full version: jsB@nk » Scrollers » Vertical scroller » Newsscroller with show-and-hide-feature onMouseDoubleClick
URL: https://www.javascriptbank.com/newsscroller-with-show-and-hide-feature-onmousedoubleclick.html

Newsscroller with show-and-hide-feature onMouseDoubleClick © JavaScriptBank.comJust doubleclick anywhere on the white space of the document and the floating newsscroller will be displayed. Doubleclick again and the newsscroller will disappear. The scripts works even when you scroll down the page. Test it.

Full version: jsB@nk » Scrollers » Vertical scroller » Newsscroller with show-and-hide-feature onMouseDoubleClick
URL: https://www.javascriptbank.com/newsscroller-with-show-and-hide-feature-onmousedoubleclick.html



CSS
<STYLE>#waterMark {BACKGROUND-COLOR: #ffcccc; BORDER-BOTTOM-COLOR: #ff0000; BORDER-BOTTOM-STYLE: ridge; BORDER-LEFT-COLOR: #ff0000; BORDER-LEFT-STYLE: ridge; BORDER-RIGHT-COLOR: #ff0000; BORDER-RIGHT-STYLE: ridge; BORDER-TOP-COLOR: #ff0000; BORDER-TOP-STYLE: ridge; POSITION: absolute}</STYLE><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


JavaScript
<SCRIPT language=JavaScript1.2><!--// Newsscroller with display-and-hide-functions onMouseDoubleClick// INSTRUCTIONS: // You need two files:// The file scrollerdblclick.html is the webpage where the floating newsscroller will// be displayed. The script on this webpage handles different jobs: // First it masters the floating business, it puts the newsscroller on the right place // and it executes the doubleclick-functions. The file newscontent211.html contains the // content of the content of the newsscroller and it makes this content scrolling. // Please put both files in the same directory. //// How to configure the script. Easiest way: copy the content scrollerdblclick.html,// paste it into your webpage and delete the whole content of the table. // The rest is needed for the script. Then configure the size and the position of // the newsscroller just below this instructions. Then configure the content of your // newsscroller (newscontent211.html) inside the style-block.var markW=140;   // pixels width of the newsscrollervar markH=90;    // pixels height of the newsscrollervar markX=5;     // newsscroller-distance to the right margin of webpage (percent) var markY=5;     // newsscroller-distance to the bottom of webpage (percent) // no need to change the variables belowvar showmenu=-1;var markRefresh=100; markX=100-markXmarkY=100-markYif (!document.all) document.all = document;if (!document.all.waterMark.style) document.all.waterMark.style = document.all.waterMark;wMark = document.all.waterMark.style;wMark.width = markW;wMark.height = markH;navDOM = window.innerHeight;  function setVals() { barW = 0;  barH = 0; if (navDOM) {  if (document.height > innerHeight) barW = 20;  if (document.width > innerWidth) barH = 20;  } else {  innerWidth = document.body.clientWidth;  innerHeight = document.body.clientHeight;  } posX = ((innerWidth - markW)-barW) * (markX/100); posY = ((innerHeight - markH)-barH) * (markY/100); }function dblclick() {showmenu=showmenu*-1}function wRefresh() {if (showmenu==1) {wMark.left = posX + (navDOM?pageXOffset:document.body.scrollLeft);  wMark.top = posY + (navDOM?pageYOffset:document.body.scrollTop);}else {wMark.left = posX + (navDOM?pageXOffset:document.body.scrollLeft)+10000; wMark.top = posY + (navDOM?pageYOffset:document.body.scrollTop)} }function markMe() { if (document.all) { setVals();document.ondblclick=dblclick;window.onresize=setVals; markID = setInterval ("wRefresh()",markRefresh);} }window.onload=markMe;//--></SCRIPT><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<IFRAME id=waterMark scrolling=no src="newscontent211.htm"></IFRAME><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


Files
http://javascriptbank.com/javascript/scroller/newscontent211.htm