Search results for 'scroll'. 1 post(s) found.

  1. 2007/09/03 Dual Scroller
2007/09/03 13:05

Dual Scroller



scrolls HTML elements within a DIV. A version of the HTML scroller modified to display a DIV on both the left and right side of the window for both IE and Netscape.
 

<!-- TWO STEPS TO INSTALL DUAL scrollER:

  1.  Add the onLoad event handler into the BODY tag
  2.  Copy the coding into the BODY of your HTML document  -->

<!-- STEP ONE: Insert the onLoad event handler into your BODY tag  -->

<BODY onLoad="start()">

<!-- STEP TWO: Paste this code into the BODY of your HTML document  -->

<div id="point1" STYLE="position:absolute;visibility:visible;">
<img src="http://kurapa.com/img/kurapa03.jpg" width=150 height=48 border=0>
</div>

<div id="point2" STYLE="position:absolute;visibility:visible;">
<img src="http://kurapa.com/img/kurapa03.jpg" width=150 height=48 border=0>
</div>

<SCRIPT LANGUAGE="JavaScript">
<!-- Original:  Bruce W.Anderson (appletlib@about.com) -->
<!-- Web Site:  http://appletlib.tripod.com/dhtml/elevator.html -->

<!-- Begin
var xPosLeft = 20;
var xPosRight = 800;
var step = 1;
var delay = 30;
var yPos = 0;
var height = 0;
var offset = 0;
var yon = 0;
var name = navigator.appName;
if (name == "Microsoft Internet Explorer") {
yPos = document.body.clientHeight;
xPosRight = document.body.clientWidth - 150;
point1.style.top = yPos;
point2.style.top = yPos;
}
else {
yPos = window.innerHeight;
document.point1.pageY = yPos;
document.point1.visibility = "hidden";
document.point2.pageX = window.innerWidth - 155;
}
function changePos() {
if (yon == 0) {
yPos = yPos - step;
}
else {
yPos = yPos   step;
}
if (name == "Microsoft Internet Explorer") {
height = document.body.clientHeight;
offset = point1.offsetHeight;
}
else {
height = window.innerHeight;
offset = document.point1.clip.height;

if (yPos < 0) {
yon = 1;
yPos = 0;
}
if (yPos >= (height - offset)) {
yon = 0;
yPos = (height - offset);
}
if (name == "Microsoft Internet Explorer") {
point1.style.left = xPosLeft;
point1.style.top = yPos   document.body.scrollTop;
point2.style.left = xPosRight;
point2.style.top = yPos   document.body.scrollTop;
}
else {
document.point1.pageX = xPosLeft;
document.point1.pageY = yPos   window.pageYOffset;
document.point2.pageX = xPosRight;
document.point2.pageY = yPos   window.pageYOffset;
   }
}
function start()
{
if (name != "Microsoft Internet Explorer") {
document.point1.visibility = "visible";
}
loopfunc();
}
function loopfunc()
{
changePos();
setTimeout('loopfunc()',delay);
}
//  End -->
</script>

<p><center>
<font face="arial,helvetica" size"-2">Free JavaScripts provided<br>
by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
</center><p>

<!-- Script Size:  2.32 KB -->

Another posts included in "HTML, Javascript"

Cursor Changer (0)2007/09/03
Color Table (0)2007/09/03
New Window (0)2007/09/04
Enlarge Image (0)2007/09/03
Confirm The Link Clicked (0)2007/09/03
Select And Deselect All Checkboxes By Javascript (0)2007/08/31
Javascript Mouse Event Handler Example (0)2007/08/31
Getting WebSearchers On Your Site (0)2007/08/31
Trackback 3 Comment 0

Trackback : Cannot send a trackbact to this post.

  1. Subject different money making ideas

    Tracked from moneyideas 2010/01/28 23:26 delete

    moneyideas

  2. Subject different money making ideas

    Tracked from moneyideas 2010/01/29 07:41 delete

    moneyideas

  3. Subject different money making ideas

    Tracked from moneyideas 2010/01/31 16:45 delete

    moneyideas