Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to add new textbox the button is pressed?

 
Mishra Anshu
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Mishra Anshu
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 224
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Eric...
I thought u were on leave on sunday(Today)... :roll:
Your's help works always....
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic