This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes onchange for dynamically added rows 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 "onchange for dynamically added rows" Watch "onchange for dynamically added rows" New topic
Author

onchange for dynamically added rows

karthik jayraj
Greenhorn

Joined: Oct 25, 2010
Posts: 1
Hi ,

I am new to javascript and have coded an invoice page through help from some available

content on web.

here is my requirement

My form contains inputs "item ,rate quantity,price" in a tabular form where one can

dynamically add or delete rows.And the requirement is that

when Quantity is entered the Price should change to Price=Quantity*Rate on tab out

So I have used a Javascript onchange() and this works fine for the first displayed row.

but for dynamically added rows this does not happen, I am not able change the price

value for dynamically added rows.

Code is as below
direct_invoice.html



my java script for dynamically adding rows works as below for each cell

for newly added row the columnQuantit will be created like this

Add row()




calculate price:

 
Have you checked out Aspose?
 
subject: onchange for dynamically added rows
 
It's not a secret anymore!