469,612 Members | 2,163 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,612 developers. It's quick & easy.

Hi, I want to change the backcolor of my button every second , can somebody help me?

Hi, I want to change the backcolor of my button every second ,for example red, after a second blue, after a second re, then blue and so on...i need it in a web form not in a windows form(in winform there is a timer.tick, there it works, but in the asp.net there is a timer.elapse, and it doesn't workd , don't know why, so i was told that javascripters could help me) can somebody help me please?(javascript/c#)
Nov 5 '07 #1
3 1459
16,027 Expert Mod 8TB
You can use setInterval for this. 1 second would be 1000 milliseconds.
Nov 5 '07 #2
ok, but i'm new to javascript so can you please write some code sample which includes the color changing and interval setting?(i don't know the syntax at all...)
i'll be gratefull.:-)
Nov 5 '07 #3
5,390 Expert Mod 4TB
hi ...

the syntax is as follows:

Expand|Select|Wrap|Line Numbers
  1. var interval = window.setInterval(func_ref, milliseconds);
have a look at the link that acoder posted, it shows you almost everything you need, make an attempt and post back in case you encounter problems with your code ...

kind regards
Nov 5 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

12 posts views Thread by Rudy | last post: by
3 posts views Thread by rn5a | last post: by
4 posts views Thread by Dean Slindee | last post: by
reply views Thread by devrayhaan | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.