Vertical scroll (IE) : Scroll « GUI Components « JavaScript DHTML

JavaScript DHTML
1. Ajax Layer
2. Data Type
3. Date Time
4. Development
5. Document
6. Event
7. Event onMethod
8. Form Control
9. GUI Components
10. HTML
11. Javascript Collections
12. Javascript Objects
13. Language Basics
14. Node Operation
15. Object Oriented
16. Page Components
17. Security
18. Style Layout
19. Table
20. Utilities
21. Window Browser
Microsoft Office Word 2007 Tutorial
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
C# / C Sharp
C# / CSharp Tutorial
ASP.Net
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
PHP
Python
SQL Server / T-SQL
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
JavaScript DHTML » GUI Components » Scroll 
Vertical scroll (IE)

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Qiksearch Vertical Scroller</title>
<style type="text/css">
.link{font-family:verdana,arial,helvetica; font-size:8pt; color:#003399; font-weight:normal}
.link:hover{font-family:verdana,arial,helvetica; font-size:8pt; color:#0099FF; font-weight:normal}
.prem_hint{font-family:verdana,arial,helvetica; font-size:8pt; color:#000000; font-weight:normal}
.header{font-family:arial,verdana,helvetica; font-size:20pt; color:#808080; font-weight:bold}
</style>
<!--BEGIN REQUIRED-->
<script language="javascript">
// Location of this script:
// http://www.qiksearch.com/javascripts/qiksearch_vertical_scroller.htm
//*********************************************
//* Qiksearch Vertical Scroller               *
//* This script when you move your mouse over *
//* displays a vertical scrolling hint        *
//* (c) Premshree Pillai,                     *
//* http://www.qiksearch.com                  *
//* E-mail : [email protected]            *
//* Use the script freely as long as this     *
//* message is intact                         *
//*********************************************

window.onerror = null;
 var bName = navigator.appName;
 var bVer = parseInt(navigator.appVersion);
 var NS4 = (bName == "Netscape" && bVer >= 4);
 var IE4 = (bName == "Microsoft Internet Explorer" 
 && bVer >= 4);
 var NS3 = (bName == "Netscape" && bVer < 4);
 var IE3 = (bName == "Microsoft Internet Explorer" 
 && bVer < 4);
 var scroll_height = 150//The scroll height
 var time_length =50//Scroll speed
 var begin_pos = 20//Start position of scroll hint
 var i;
 var j;
 
if (NS4 || IE4) {
 if (navigator.appName == "Netscape") {
 layerStyleRef="layer.";
 layerRef="document.layers";
 styleSwitch="";
 }else{
 layerStyleRef="layer.style.";
 layerRef="document.all";
 styleSwitch=".style";
 }
}

//SCROLL
function Scroll(layerName){
if (NS4 || IE4) {
 if (NS4 || IE4) { 
 if(i<(begin_pos+scroll_height)){
 eval(layerRef+'["'+layerName+'"]'+
 styleSwitch+'.visibility="visible"');
 eval(layerRef+'["'+layerName+'"]'+
 styleSwitch+'.top="'+i+'"');
 i++;
 j++;
 if(i==j){
 setTimeout("Scroll('"+layerName+"')",time_length);}
 }
 }
 }
}

//STOP SCROLLING
function StopScroll(layerName)
{
i=begin_pos+scroll_height;
  eval(layerRef+'["'+layerName+'"]'+
  styleSwitch+'.top="'+i+'"');
  hideLayer(layerName);
}

function reset()

i=begin_pos;
j=i;
}

// HIDE HINT
function hideLayer(layerName){
 if (NS4 || IE4) {
 eval(layerRef+'["'+layerName+'"]'+
 styleSwitch+'.visibility="hidden"');
 }
 }

</script>
<!--END REQUIRED-->
</head>
<body bgcolor="#FFFFFF">
<center>
<span class="header">Qiksearch Vertical Scroller</span>
<br>

<!--BEGIN REQUIRED-->
<a href="#" class="link" onmouseover="javascript:reset();Scroll('prem_hint');" onmouseout="javascript:StopScroll('prem_hint');">Move your mouse over</a>
</center>
<div id="prem_hint" style="position:relative; left:50; visibility:hidden" class="prem_hint">
<font color="#FF0000"><b>Vertical Scrolling!</b></font>
</div>
<!--END REQUIRED-->
<table align="center" width="400"><tr><td>
<font face="verdana,arial,helvetica" size="-1" color="#000000">
This script is a simple modification of <a href="link_hint_scroller.htm" class="link">Link Hint Scroller</a>. The only difference here is that the hint will scroll vertically.<br><br>
When you move your mouse over the above link a hint or something about the link
will appear below the link in a vertically scrolling fashion. When you move your mouseout the scrolling will stop.
<br><br>To use this  Javascript,view the source of this document. Firstly you must copy the script
and place it in the head section. Then you must copy the &lt;DIV&gt; section and place it wherever you want it in the body. All the required section are marked by the comments &lt;!--BEGIN REQUIRED--&GT; and &lt;!--END REQUIRED--&gt;

<br><br>
<font face="courier">scroll_height</font> : Scroll height variable (150 here)<br>
<font face="courier">time_length</font> : Speed of scroll (50 here, meaning after 50 milliseconds the hint will change position by pixel i.e a speed of 20 pixels/second)<br>
<font face="courier">begin_pos</font> : Beginning position of hint (20 here)
</font>
</td></tr></table>
<br>
<center><a href="mailto:[email protected]class="link">&#169 Premshree Pillai</a></center>

</body>
</html>

           
       
Related examples in the same category
1. Text Scroll when clicking
2. Text Scroll when mouse over
3. Scroll image and mimic a compass
4. Scroll text with custom scoll bar
5. Scoll text with flash scroll bar
6. Slide tab
7.  Diagonal Scroller (IE)
8. Text scroll
w___w_w__.__j_a__v___a2s__.c___o___m__ | Contact Us
Copyright 2003 - 08 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.