EasyUI Forum
May 05, 2024, 07:12:39 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: PHP URL POST PROGRESSBAR  (Read 5236 times)
tooletime
Newbie
*
Posts: 8


View Profile Email
« on: July 18, 2016, 10:44:39 AM »

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.

Code:
$.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?
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: July 19, 2016, 12:11:07 AM »

You can use $.messager.progress to show a progress message window while posing your data.
Code:
$.messager.progress({
title:'title',
msg:'processing...'
})
$.ajax({
url: ...,
complete: function(){
$.messager.progress('close');
}
});
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!