943,922 Members | Top Members by Rank

Ad:
Sep 18th, 2009
1

ajax progress bar while php exec command

Expand Post »
Hello all.
Even though my javascript/ajax knowledge is very low, I would like to be able to do the following, for which I ask you for help:

I have a python script that runs from php with exec command. It takes about 5-10 seconds to complete. While the python script is processing I would like to show a progress bar to the user. In fact, it doesn't need to be a progress bar, a 'loading... bar' would be more than enough.

As I have already said, I don' know much about this, but I think I need ajax to do this. Googling about this I have found this blockUI plugin that seems great.

I know I have to use something like $().ajaxStart($.blockUI).ajaxStop($.unblockUI); but I really don't know how.

Here are some 'chunks of of code' I think will be necessary:
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. <script src="jquery-1.3.2.min.js"></script>
  2. <script src="blockUI.js"></script>
  3. <script type="text/javascript"></script>
  4. $.blockUI({ message: '<h1><img src="busy.gif" /> Just a moment...</h1>' });
  5. </script>
  6. <script type="text/javascript"></script>
  7. $().ajaxStart($.blockUI).ajaxStop($.unblockUI);
  8. </script>

Sorry if I seem to vague, but I really don't know much about this and would be very grateful if anyone could help me out on this. Thanks.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Light Poster
nunos is offline Offline
46 posts
since Aug 2009
Sep 19th, 2009
0

Re: ajax progress bar while php exec command

Anyone? Thanks.
Reputation Points: 10
Solved Threads: 0
Light Poster
nunos is offline Offline
46 posts
since Aug 2009
Jun 6th, 2011
0
Re: ajax progress bar while php exec command
I know this thread is really old, but in case it helps: take a look at http://api.jquery.com/category/ajax/...vent-handlers/. You can throw functions that show and hide your message at ajaxStart() and ajaxStop().
Reputation Points: 175
Solved Threads: 100
Veteran Poster
twiss is offline Offline
1,000 posts
since Apr 2010

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in JavaScript / DHTML / AJAX Forum Timeline: ExtJS 4 Now Offers Native Drawing, Charting
Next Thread in JavaScript / DHTML / AJAX Forum Timeline: Instant name checking/showing using Ajax/Jquery





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC