473,412 Members | 3,015 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,412 software developers and data experts.

blinking textbox in javascript, html and asp

Hi!

I want to blink the textbox and place the cursor in that text box. (If the user didn't enter the name and click the submit button. That time, the text box want to blink "two or three times") How? I didn't have any idea.... so please help me..
Expand|Select|Wrap|Line Numbers
  1. <form action="demo_disquery.asp" method="get">
  2. Your name: <input type="text" name="name" size="25" />
  3. Age: <input type="text" name="age" size="3" />
  4. <input type="submit" value="Submit" />
  5. </form>
  6.  
Thanks and Regards,
Susan.
Apr 22 '09 #1
5 5430
dmjpro
2,476 2GB
What do you mean by "blink the text box two or three times"?
Apr 22 '09 #2
If the user didn't enter the name in the textbox, but the enter the age and click the submit button. that time "the name textbox want to blink".(I know how to display alert message, but i don't know how to blinking the textbox.)

Thanks and Regards,
Susan.
Apr 22 '09 #3
gits
5,390 Expert Mod 4TB
have a look at the following example, just click the textbox to let it 'blink' :)

Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <head>
  3. <script type="text/javascript">
  4. function blinkBox() {
  5.     var n = document.getElementById('myTbox');
  6.     var t = 6;
  7.     var b = 0;
  8.     var c = [ 'red', 'white' ];
  9.  
  10.     var i = window.setInterval(function() {
  11.         n.style.backgroundColor = 
  12.             n.style.backgroundColor != c[0] ? c[0] : c[1];
  13.  
  14.         b++;
  15.  
  16.         if (b == t) {
  17.             window.clearInterval(i);
  18.         }
  19.     }, 500);
  20. }
  21. </script>
  22. </head>
  23. <body>
  24.     <input type="text" id="myTbox" onclick="blinkBox();"/>
  25. </body>
  26. </html>
  27.  
kind regards
Apr 22 '09 #4
dmjpro
2,476 2GB
Here you alternate the "backgroundColor", i may blink the "borderColor" ;)
Apr 22 '09 #5
gits
5,390 Expert Mod 4TB
of course you may 'blink' whatever style you want ... it's just a simple example for how to do such things ...

kind regards
Apr 22 '09 #6

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

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...
2
by: Hazzard | last post by:
I just realized that the code I inherited is using all asp.net server controls (ie. webform controls) and when I try to update textboxes on the client side, I lose the new value of the textbox when...
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...
8
by: nil | last post by:
Hello all, It's urgent... i want to add autocomplete textbox facility in my application like google. as you type it suggests option to the user..i want the same kind of facility...i know i...
6
Coldfire
by: Coldfire | last post by:
I am having problems with Maxlength of Multiline "Textbox". I have browsed alot to find the solution. Tons of javascripts have been found but they all deal with <asp:textarea >............. and...
2
by: awaz | last post by:
hi ineed your help on creating a blinking textbox or label that changes color may be from blue to red.thanx waitin for your response.
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.