473,385 Members | 1,312 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,385 software developers and data experts.

Display text box automatically after pressing enter key in first text box

kaleeswaran
132 100+
hi!
in my web page...after i am insert the value into text box then i press enter then next text box should display automatically.how to do that....
thank you,
Oct 9 '07 #1
8 2459
dmjpro
2,476 2GB
hi!
in my web page...after i am insert the value into text box then i press enter then next text box should display automatically.how to do that....
thank you,
Expand|Select|Wrap|Line Numbers
  1. <input type = text onkeypress = "showText(event)">
  2.  
Expand|Select|Wrap|Line Numbers
  1. function showText(e)
  2. {
  3.  var key = e.which ? e.which : e.keyCode;
  4.  if(key == 13)
  5.  {
  6.   //your next processing code goes here
  7.  }
  8. }
  9.  
Debasis Jana
Oct 9 '07 #2
acoder
16,027 Expert Mod 8TB
Changed the thread title to better describe the problem.
Oct 9 '07 #3
kaleeswaran
132 100+
hi!
i need to display the text box dynamically after the customer enter the key...i am having idea we can do using onkeypress event.but i don't know how to that.
so please tell me some idea....
thank you,
Oct 9 '07 #4
acoder
16,027 Expert Mod 8TB
Which part have you got difficulty with? Detecting the enter key or displaying a text box dynamically?
Oct 9 '07 #5
kaleeswaran
132 100+
i feel difficult in both part but now i am getting some idea through you given keycode function now my doubt is how to create the text box dynamically?...
thanks,
Oct 10 '07 #6
dmjpro
2,476 2GB
i feel difficult in both part but now i am getting some idea through you given keycode function now my doubt is how to create the text box dynamically?...
thanks,
Having a look at my code.
Expand|Select|Wrap|Line Numbers
  1. var text_ref = document.createElement("input");
  2. text_ref.setAttribute("type","text");
  3. .
  4. .
  5. document.body.appendChild(text_ref);
  6.  
Debasis Jana
Oct 10 '07 #7
kaleeswaran
132 100+
Hi,

i have dynamically created a table with two rows and have inserted text boxes in each column./ Textboxes have also been inserted dynamically. My question is how do i find the id of the textboxes currently being used..
thank you,
Oct 10 '07 #8
dmjpro
2,476 2GB
Hi,

i have dynamically created a table with two rows and have inserted text boxes in each column./ Textboxes have also been inserted dynamically. My question is how do i find the id of the textboxes currently being used..
thank you,
Expand|Select|Wrap|Line Numbers
  1. <input type = "text" id = "some_id" onkeypress = "getId(this.id)">
  2.  
Expand|Select|Wrap|Line Numbers
  1. function getId(id)
  2. {
  3.  alert(id);
  4. }
  5.  
Debasis Jana
Oct 10 '07 #9

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

Similar topics

2
by: NewBob | last post by:
Since Access automatically highlights all of the text in a text control (I use it to hold data from a memo field) when the control is activated, I've added the following code to put the cursor at...
9
by: Megan | last post by:
Hi- I'm creating a database of music bands with their cds and songs. I'm trying to program an SQL statement so that I can enter a string of text in a textbox, press the 'Enter' key, and have...
10
by: mg | last post by:
I want to enter characters in a TextBox in a WebForm, press a Button in the WebForm, and read the characters that were typed into the TextBox from within the Button_Click event handler. The main...
4
by: peshrad | last post by:
Hi ! I'm working with Win 2K and Visual Studio 2003. I have a problem because pressing <ENTER> in a text input control causes a postback of my web form. Here comes some example code (already...
5
by: grinder | last post by:
first off, i am an extreme newbie to C. i am an undergrad research assistant and i have been shifted to a project that involves building a fairly involved c program. The part that i am stuck on now...
1
by: bigmaddaz | last post by:
Ok im designing an application for working out compount interest. The user starts the page, 3 prompts appear, one asking for money invested, next asking for rate of interest, and last one asking for...
9
by: Camellia | last post by:
Hi all, I'll get straight into it. When I try to run the code: ..... while (scanf("%c", &c) == 1) printf("%c", c); ..... I input "abcd" follows by an EOF(Ctrl + d) instead of pressing...
1
by: Camellia | last post by:
Hi all, I'll get straight into it. When I try to run the code: ..... while (scanf("%c", &c) == 1) printf("%c", c); ..... I input "abcd" follows by an EOF(Ctrl + d) instead of pressing...
2
by: sathyan8294 | last post by:
i am using dotnet 2003.i am doing my project in vb.net windows application.i have two form in my project.first form is datagrid .In second form label and textboxes are avilable to save the entering...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.