Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Display Loading Page While php is processing
Old 06-01-2009, 01:38 AM Display Loading Page While php is processing
Jasonpv's Avatar
Super Talker

Posts: 102
Trades: 0
Hello, I have a php script that sends out multiple SOAP requests that can take a bit of time. Is there any way to have my php script display a loading page while this takes place then displays the results page once it is finished? I looked into javascript but I'm not sure if it can accomplish this while the php code is processing. Thanks for any help!
Jasonpv is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 06-01-2009, 03:56 AM Re: Display Loading Page While php is processing
jim1228's Avatar
Extreme Talker

Posts: 195
Name: Jim
Location: Ohio
Trades: 0
PHP Code:
echo '<p>Starting request 1</p>';
flush(); 
sleep(2);
echo 
'<p>Request 1 done. Starting request 2.</p>';
flush(); 
sleep(2);
echo 
'<p>Request 2 done.</p>'
jim1228 is offline
Reply With Quote
View Public Profile Visit jim1228's homepage!
 
Old 06-01-2009, 03:58 AM Re: Display Loading Page While php is processing
JeremyMiller's Avatar
WT Moderator

Posts: 1,712
Name: Jeremy Miller
Location: Las Vegas, NV
Trades: 0
You'll need Javascript for this as PHP can't change a page on the user's browser (in real time like you're talking about -- it can obviously output HTML). Looking into Ajax and load progress indicators as I'm sure there are a few tutorials and widgets out there to help.

I did a quick search and found a nice introduction (didn't see the code you wanted, but a discussion of the things you'll need to consider): http://ajaxpatterns.org/Progress_Indicator

I also found a YUI example: http://developer.yahoo.com/yui/examp...l-loading.html

Hope that helps.
__________________
Jeremy Miller

Please login or register to view this content. Registration is FREE
JeremyMiller is offline
Reply With Quote
View Public Profile Visit JeremyMiller's homepage!
 
Old 06-01-2009, 04:12 AM Re: Display Loading Page While php is processing
jim1228's Avatar
Extreme Talker

Posts: 195
Name: Jim
Location: Ohio
Trades: 0
http://www.tuxradar.com/practicalphp/13/9/0

LMAO

with javascript display:

Use jquery to get cool effects while the stuff is loading or do

http://nsaunders.wordpress.com/2007/...rocess-in-php/
jim1228 is offline
Reply With Quote
View Public Profile Visit jim1228's homepage!
 
Old 06-01-2009, 11:25 AM Re: Display Loading Page While php is processing
Jasonpv's Avatar
Super Talker

Posts: 102
Trades: 0
Wow, thanks for everyone's response! I will try to play with a few of these and let you know how it goes!
Jasonpv is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Display Loading Page While php is processing
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.14958 seconds with 12 queries