473,398 Members | 2,212 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

how to make a blinking butto?

I'd like to make a blinking button: how can I do?
Thank you in advance,
Andrea.
Oct 20 '05 #1
1 1479
You can set a timer and handle timer events to change button color.

Like this:

var iTimerID = null;
var nTAmount = 0;
var oBlinkedElement = null;
var nBlinkTimes = 20; /*How much times field must blink*/

function setFieldBlink( oElement ) {
if (!oElement || !oElement.className)
return;

oBlinkedElement = oElement;
iTimerID = window.setInterval(blinkField, 100);
}

function blinkField()
{
oBlinkedElement.style.backgroundColor = nTAmount % 2 == 0 ? '#eee' :
'#fff';
nTAmount++;

if (nTAmount > nBlinkTimes) {
nTAmount = 0;
window.clearInterval(iTimerID); }
}
_andrea.l wrote:
I'd like to make a blinking button: how can I do?
Thank you in advance,
Andrea.


Oct 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Hugo | last post by:
I am building a website. Now I want to put a couple of lines on my page which I want to blink. <blink> is not supported for shapes/lines and I want to decide myself if i want a line to blink. What...
5
by: Markus | last post by:
Blinking control Perhaps my question is not exactly an Access question, but may somebody might give me an answer.i have a very important control on my report, called "Stockflow" and in case...
2
by: Sharon | last post by:
The ErrorProvider text is also blinking together with the icon. It’s making the reading of the error description very uncomfortable. Is there a way to prevent the text from blinking while the...
1
by: Sharon | last post by:
The ErrorProvider text is also blinking together with the icon. It’s making the reading of the error description very uncomfortable. Is there a way to prevent the text from blinking while the...
2
by: Ling | last post by:
Hi, I guessed this is a weird question but it really bothers me. I created a web page w/ asp.net, have a menu on the top and a listbox right below it. When I try to navigate the menu, the...
3
by: fbergroth | last post by:
Hi, I'm quite new to C# allthough I've been programming in other languages for quite a while. I'd like to change the blinking cursor inside a TextBox, I guess I must derive the class and...
5
by: michels287 | last post by:
Right now I have a touchscreen with a virual keyboard. I would like to create arrow keys. If the user messed up the inputted text, he can move the blinking cursor left one space at a time between...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.