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

unable to access the values of dynamically newly added rows to table

 
rammie singh
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi every body


i am developing an application where i am displaying certain values from database in the form of table through a query.

Now my application has a provision for adding new rows or deleting exixting rows from table.

consequently the values of newlly added rows or upadeted rows has to be send to servlet from where they are put into databse through query.

But problem is that i am unable to access the values of newly added rows to table.

i am trying to access values through javascript function.

what i am doing here is , i have created various hidden variables for each column...and through javascript function i am trying to add the values of each column in their respective hidden variable.

consequently these hidden variables are fetched in servlet and are then inserted into database.


but unable to access the newly aded values although i am able to access the values of rows of table being fetched from database.
please help in finding the solution for this.
thanks and regards.

my code is





there are so many things interelated here in this page ....but for now our main concern is on two functions

first function submitForm()


and second function addRowToTable() of javascript.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are we talking Internet Explorer here?

If so IE has issues with assigning names. Look how to do it here: http://www.pascarello.com/examples/createElement.html

Eric
 
rammie singh
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi eric...
thanks for giving guidance..yaah you are right....it's problem of IE....because i tried accessing my application from a fedora machine and it was giving result.

But since most of users would be using IE ,So can you please tell me what do we need to do the changes so that it runs on all browsers.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My example code on that page shows you how to do it.

Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic