开发者

Using jQuery, how can I obtain form data from fields that have been added by manipulating the DOM?

开发者 https://www.devze.com 2022-12-22 18:17 出处:网络
I have a tab开发者_开发知识库le body that grabs it\'s rows (and form fields) via AJAX on various events. Everything is working fine, except one part: I can\'t obtain form data from any of the table\'s

I have a tab开发者_开发知识库le body that grabs it's rows (and form fields) via AJAX on various events. Everything is working fine, except one part: I can't obtain form data from any of the table's rows after it gets manipulated.

I've played around with the live() function, but I can't seem to get the right setup to pull in the form data.

Any ideas?


Have you tried http://api.jquery.com/serialize/ ?


everything inside the DOM is accessible from jquery no matter how it got added/manipulated..

Show us some code of what you do and what you want to do if you want a more detailed answer...


I found the issue in my code. Upon rebuilding the table, I had a slightly different field name for the fields than I used when building the table on page load.

Thank you for your quick responses.


It sounds like you may need to re-factor that code such that the same code that builds the table at page load also rebuilds it later on.

0

精彩评论

暂无评论...
验证码 换一张
取 消