i have a datagrid that i use basically for a shopping cart per say with each row of the datagrid being an object i want to submit. Example.
COPIES TITLE
2 ME1
2 ME2
3 ME3
1 ME4
2 ME5
on submit, it will post an url to the server that it sends it to. I could have numerous rows that the user has selected for post and some rows get dropped from post with the timeout i have set.
$.messager.confirm('Confirm','Are you sure you want to Submit ' + row1 + ' items?',
function (r)
{
if (r)
{
for (var i=0; i< rows.length; i++)
{
grid.datagrid('endEdit',i);
$.ajax({
type: "POST",
cache: true,
url: "jobsubmit.php?ID=" + rows[i].ID + "&copies=" + rows[i].copies + " + &emailfrom=" + emailfrom +"",
//data: postData,
success: function (data, textStatus, jQxhr)
{
$.messager.show
({
title:'Job Submitted',
msg:'Thank you for your job submittal.',
timeout:20000,
showType:'slide'
}); //messager.show
setTimeout( function() {location.reload(); }, 20000);
}
How can i show a progress bar while each row gets posted and then keep the screen from being used while its submitted. Then refresh grid when its complete?