Code Bank
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingCode Bank

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old February 6th, 2004, 01:38 PM
Rich's Avatar
Rich Rich is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Fort Lauderdale, FL
Posts: 152 Rich User rank is Sergeant (500 - 2000 Reputation Level)Rich User rank is Sergeant (500 - 2000 Reputation Level)Rich User rank is Sergeant (500 - 2000 Reputation Level)Rich User rank is Sergeant (500 - 2000 Reputation Level)Rich User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 11 h 49 m 15 sec
Reputation Power: 22
Scrolling Button

<!--
this code was written by Mickel
Version 1.0 -- 21 August 2001
-->
<HTML>
<HEAD>
<TITLE>Scrolling Button Test</TITLE>
<SCRIPT>
// Setting some global variables here
var ScrollPos = 0; // Initial Index of position in MyScrollText
var NormalText; // Text of the button before mouseover
var MyObject;// Object to be manipulated
var MyScrollText; // Text to be scrolled on object
var MyInterval; // ID for Interval
var Spaces = ""; // Spaces for padding
// Usage SetScroll(true|false,this,[Text
// to be Scrolled])
function SetScroll(Activate,Object,ScrollText)


{
if (Activate == true) // Check to see if scroll needs to be started when mouse is over object


{
NormalText = Object.value; // NormalText is actual Object
var Spaces = "";
for (i=0;i < NormalText.length; i++)
Spaces += " "; // Padding for scroll text is a Space
MyObject = Object; // MyObject is this object
MyScrollText = Spaces + ScrollText + Spaces; // Adding spaces on each side for scrolling effect
MyInterval = window.setInterval("ScrollText();", 100); // Set interval for 100 mseconds (Change this number for fast or slower scrolls)
}
else


{
window.clearInterval(MyInterval); // Mouse has left the object, interval in cleared (cancelled)
ScrollPos = 0; // Index for position in MyScrollText has been set back to initial value
if (NormalText != null) // If the NormalText has a value
Object.value = NormalText; // Set the button back to its original value
}
}
function ScrollText()


{
MyObject.value = MyScrollText.substr(ScrollPos,NormalText.length) // Object text becomes substring of MyScrollText
ScrollPos ++; // ScrollPos is increased by 1
if (ScrollPos > MyScrollText.length) // If the ScrollPos if more than the length of MyScrollText
ScrollPos = 0; // then the Index position will be set back to 0 (beginning)
}
</SCRIPT>
</HEAD>
<BODY>
<! You can use any button with any name>
<! Change to width of the button for accomodate your text>
<INPUT type="button" style="width:100" value="Test Button"
onmouseover="SetScroll(true,this,'Click here to do Something!');" onmouseout="SetScroll(false,this)">
<!Also works with an Input Box or similar objects that use the value method>
</BODY>
</HTML>

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingCode Bank > Scrolling Button


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump





 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 1 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek