Meaningless Drivel is fun!*
The moose likes HTML, CSS and JavaScript and the fly likes How to add new textbox the button is pressed? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "How to add new textbox the button is pressed?" Watch "How to add new textbox the button is pressed?" New topic
Author

How to add new textbox the button is pressed?

Mishra Anshu
Ranch Hand

Joined: Sep 16, 2003
Posts: 224
Hi!!!
I have got some of the textboxes (say 2)in rows of a table.
I have a button . I have to somehow generate a new textbox
in the new row of the table each time the button is pressed
(OnClick event) and also assign the textbox with a unique name.
Plz...give a sample code.
Thanks


"Ignorance is bliss"
Mishra Anshu
Ranch Hand

Joined: Sep 16, 2003
Posts: 224
And yes...
each row has a single text box.
But after a certain count of textboxes in the table , even after onclick
of button new textbox shouldn't be added...

Plz... come on..
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
http://www.coderanch.com/t/114458/HTML-JavaScript/add-Table-Row-JS
You need to add the button code where it says innerHTML
Mishra Anshu
Ranch Hand

Joined: Sep 16, 2003
Posts: 224
Thanks Eric...
I thought u were on leave on sunday(Today)... :roll:
Your's help works always....
 
jQuery in Action, 2nd edition
 
subject: How to add new textbox the button is pressed?