Get value from a collapsed input field
Get value from a collapsed input field
robyone
Posts: 16Questions: 3Answers: 0
Hi,
I have a responsive data table with input fields: when the rows are collapsed, the fields in the row are no longer accessible from javascript and dom, nor by the field name, nor through the id: they "disappear", unless i expands manually the row by clicking the "plus" button.
Is there a way to retrieve the fields value when the row is collapsed?
Thank you.
This discussion has been closed.
Answers
One at a time, please, otherwise do not understand anything! ;-)
Possible that no one, not even the developers, can fix this? Collapsed fields are no longer accessible, it does not seem a small problem ....
Please provide a link to a test page showing the problem, as required in the forum rules.
http://datatables.net/forums/discussion/12899/post-test-cases-when-asking-for-help-please-read#latest
Sorry, I thought that the problem was simple ...
Here is the link:
http://test.hostingveloce.it/
When the row is collapsed, the hidden input fields "do not exist" and are not found neither by name nor by id field: if click on "Get text20 value from id" or "Get text20 value from input name", javascript returns an error "TypeError: Can not read property 'value' of null."
Are not even sent by post if click on "Send form": the page receives no value.
If you expand the line, and then click on the buttons themselves, everything ok.
It might even be good a way to always have the rows expanded and not allow the user to collapse them .....
No idea??????
Solved by changing the file "dataTables.responsive.js" to keep always expanded rows and hiding the "+/-" button to prevent the user to collapse the rows.
I did not find other solutions, unfortunately ... l.
Thanks anyway...