![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Programmer
Join Date: Oct 2005
Posts: 54
Rep Power: 4
![]() |
How is this done? PHP, Javascript or both?
Hi all!
I have a php page which contains a form. The user enters data and then the data is processed to give some results. What I would like to have is a page inbetween, that says, for instance, "Your job is being processed" or something similar, and then, when the job is done, refresh itself to show the results. I have seen it in many websites, but I don't know what I need to get me started... |
|
|
|
|
|
#2 |
|
Hobbyist Programmer
|
I would think to have the form go to that page and then have a header() to go to the next page, just make sure you post the information you want between the middle and last page.
|
|
|
|
|
|
#3 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
In the normal course of events with http transactions the server never initiates. That means your server has to plant something in the client-side material that initiates. Whether that's a periodic automatic refresh, series of redirections, or script is up to you. If it's script, the browser must be able and agreeable about executing it. In any case, it's an intrusion on the client's property, equipment, and time. Nothing to keep him/her from tossing you in the trash if it gets intrusive. I would.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#4 |
|
Newbie
Join Date: Oct 2005
Posts: 29
Rep Power: 0
![]() |
In php, you could just make it display "Your job is being processed" and in a given amount of seconds redirect to another page and send data to that page so it shows the results.
|
|
|
|
|
|
#5 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
![]()
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#6 |
|
Programmer
Join Date: Oct 2005
Posts: 54
Rep Power: 4
![]() |
Hi, thank you all for your time!
Actually, what I do is not just take user's input and print it, but i use the data which the user sends as input to an external program that I call through PHP. This program is a bit slow, so I thought of using such a page (not a very complicated one) so that the user will see a message like "Jour job is being processed", and then, when the job is done, the page will refresh and show the results or will redirect to the results page. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|