I have a jgrid and on selectiing and submitting the row I have to submit the for data with that url which contains two date field… How can I bind the values of form and selected row together on submit to server?
Nay help will be appreciated.. Thanks!
Update 1:
jQuery(".sorder").click(function() {
var earliestDate = jQuery("input#e").val();
var latestTimeDate = jQuery("input#e").val();
var grid = jQuery("#orderPreview");
var id = grid.jqGrid('getGridParam', 'selrow');
if (id) {
var ret = grid.jqGrid('getRowData', id);
}
$.ajax( {
type : "POST",
url : "/cpsb/internalOrderList.do",
data : {
method : "create",
lpn : ret.licensePlateNumber,
sku : ret.sku,
description:ret.description,
cases:ret.caseQuantity,
hold:ret.isHeld,
earliestDate:earliestDate,
latestTimeDate:latestTimeDate
}
});
});
You can get the data from the grid with
then you can use
to send the data at once. Because the data will be send per POST and not per GET you have no URL restriction.
By the way in your code you use
probably in one of the row the id “e” should be changed.