Search the web
Sign In
New User? Sign Up
JS-Jive · The premiere Yahoo! Javascript Group
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
How to specifiy parameter for eventhandle as assigning to dynamical   Message List  
Reply | Forward Message #21076 of 21091 |

I have some code that adds a new row of INPUT fields to a form when a
button is pressed.

I use the following line to assign an onchange eventhandler.

element.onchange = function(){updateItemCost(rowNum);};

The 'rowNum' parameter is defined in the Javascript function that
calls the above code.

This works great if the user adds one row, enters the data, then adds
the next row, enters data, etc.

But if the user adds two or more rows, the 'rowNum' received is always
the number of the last row added.

I can tell that separate INPUT objects are being created, because if I
SUBMIT, I can see the proper fields names (itemQuantity3,
itemQuantity4, etc) in the POST data.






Thu May 31, 2007 6:58 pm

darnit78
Offline Offline
Send Email Send Email

Forward
Message #21076 of 21091 |
Expand Messages Author Sort by Date

I have some code that adds a new row of INPUT fields to a form when a button is pressed. I use the following line to assign an onchange eventhandler. ...
Don Arnett
darnit78
Offline Send Email
May 31, 2007
7:00 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help