473,407 Members | 2,320 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,407 software developers and data experts.

How to create dynamic textbox in javascript

Hi,How to create dynamic Texboxs in javascript and thereafter i need to get values from each textbox

Thanks in advance
Aug 14 '07 #1
2 15310
pbmods
5,821 Expert 4TB
Heya, Naveen. Welcome to TSDN!

When you create the textbox, you can save the reference in a global variable, for example:
Expand|Select|Wrap|Line Numbers
  1. var textboxes = {};
  2.  
  3. .
  4. .
  5. .
  6.  
  7. textboxes['theIdOfTheTextBox'] = document.createElement('textbox');
  8.  
  9. .
  10. .
  11. .
  12.  
  13. textboxes['theIdOfTheTextBox'].value = 'the new value for the textarea';
  14.  
Aug 14 '07 #2
Heya, Naveen. Welcome to TSDN!

When you create the textbox, you can save the reference in a global variable, for example:
Expand|Select|Wrap|Line Numbers
  1. var textboxes = {};
  2.  
  3. .
  4. .
  5. .
  6.  
  7. textboxes['theIdOfTheTextBox'] = document.createElement('textbox');
  8.  
  9. .
  10. .
  11. .
  12.  
  13. textboxes['theIdOfTheTextBox'].value = 'the new value for the textarea';
  14.  

Thanks,Hello Sir ,
i am using Div tag to create dynamic textbox
for ex:
Expand|Select|Wrap|Line Numbers
  1. function generateRow() {
  2.     var d=document.getElementById("div");
  3.     d.innerHTML+="<input type='text' name='txt1'>";
  4.     d.innerHTML+="<input type='text' name='txt2'><br>" ;
  5.     numLinesAdded++;    
  6.     } 
actually am not aware of this javascript functionality as i am new
could you please provide more information in this regard...
Aug 14 '07 #3

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

Similar topics

8
by: Ashish Shridharan | last post by:
Hi All I have been trying to add a control to the header cell of a datagrid on my ASP.NET page. These controls are defined in the HTML as ASP.NET web controls. They are being added into the...
7
by: Bil Muh | last post by:
Esteemede Developers, I would like to Thank All of You in advance for your sincere guidances. I am developing a software using Visual C++ .NET Standard Edition with Windows Form (.NET)...
1
by: pepsi330ml | last post by:
I need to create a crosstab report that does not need the user to know the total number to columns and manually add a new textbox and amend the VBA code. The VBA code should handle everything from...
3
by: RSB | last post by:
Hi Every one Having tuff time creating web controls Dynamically. All i am trying to do is read a table and generate a list of ASP TEXT Box. So how do i create this Control dynamically and where...
1
by: Mortar | last post by:
Hi, I have a datalist which has a column with data from a database. I would like the column to either show a textbox with the value of the data field, or a button. The contol created would...
3
by: Grey | last post by:
I know i can use placeholder control for dynamic create controls. but my requirement is i need to create multiple controls. when the user click the button, one textbox will be created. If user...
1
by: MaryamSh | last post by:
Hi, I am creating a Dynamic Search in my application. I create a user control and in Page_load event I create a dynamic dropdownlist and 2 dynamic button (Add,Remove) By pressing Add button...
0
by: MaryamSh | last post by:
Create Dynamic Dropdownlist Controls and related event -------------------------------------------------------------------------------- Hi, I am creating a Dynamic Search in my application. I...
4
by: marisenthil | last post by:
How to access the value of the dynamic textbox by its id? I created more dynamic textbox using the below in loop Dim tb As New TextBox tb.ID = "txt_" + Str$(i) and it assigned unique...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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:
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
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.