Hello I have a var in a function when I hit submit…I want to pass the var”fieldNames” to my form….
$(document).ready(function() {
$("#submit").click(function() {
$("#sortable").each(function() {
var fieldNames = $(this).sortable('toArray').toString();
});
$("#detColumnSortorder").submit;
});
});
I want to pass this in my form: fieldNames
Put in a hidden input field in your form. Then set the value on the hidden field. That way when the form submits, the value in the hidden field will be submitted.
HTML:
jQuery: