Newbe: DataTables with form elements example; alert to url
Newbe: DataTables with form elements example; alert to url
jsail
Posts: 4Questions: 1Answers: 0
Your example 'DataTables with form elements' works perfect. Also hidden values are printed in the Alert.
But how can I use that var 'sData' to use it as GET or POST submit?
When I try it in the form, the hidden data is not included.
Thank you for your help.
Joseph
But how can I use that var 'sData' to use it as GET or POST submit?
When I try it in the form, the hidden data is not included.
Thank you for your help.
Joseph
This discussion has been closed.
Replies
Allan
as a Newbe, I would prefer to keep everythin so simple as possible...
Is there a easy way, I could use the variable sData in the body of the document?
Joseph
[code]$('#form').submit( function() {
var sData = oTable.$('input').serialize();
alert( "The following data would have been submitted to the server: \n\n"+sData );
return false;
} );
...
<?php echo "sData=".sData."
";
...
[/code]
1. Move the input elements into the document (use fnGetNodes to get all row nodes from the table)
2. Copy the elements and put them into the document with their values set to match the original.
Allan
Hi Allan,
I tried with the ajax to submit post the data. Finally it works, but it is just glued together. The code originally comes from the example "form.html".
Thank you for your help.
Joseph