Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within HTML Pages with CSS and JavaScript
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
HTML Pages with CSS and JavaScript
Creating text boxes dynamically
Sanny kumar
Ranch Hand
Posts: 53
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Based on the number of letters in the
string
i need to create a group of text boxes dynamically.(using javascript)
suppose : the string contains the letters EXAMPLE , 7 textboxes should be created dynamically,
Anyone has an idea?
Harish Kashyap
Ranch Hand
Posts: 118
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
use javascript and dhtml to achieve this.
try exploring the concept of innerHtml
Sanny kumar
Ranch Hand
Posts: 53
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi Harish,
i used the concept innerhtml.but my requirement is all the text boxes with the same name.
the code is as follows:
function changeIt()
{
for(s=1;s<=document.form.t1.value;s++)
{
my_div.innerHTML = my_div.innerHTML +"<br><input type='text' name='t1'>"
}}
}
if i change the text name in the onclick event it works..if i use the same name of text box inside <body> it wont work..
any idea....
Bear Bibeault
Sheriff
Posts: 67746
173
I like...
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Moved to the HTML/Javascript forum.
[
Asking smart questions
] [
About Bear
] [
Books by Bear
]
Eric Pascarello
author
Posts: 15385
6
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
document.form.t1.value is the string. You are missing length to get the number of characters entered.
Eric
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
text file ?? simple program
dynamic text box
can you increment letters?
Issue with h:inputText
Auto tabbing among text fields created with logic:iterate
More...