Re: [PHP] OT ??: Form posting without leaving form
Thanks. This worked out to be the best solution of the suggestions I had received. I've implemented it and it works as advertised. Bruce John Browne wrote: Check out the xmlhttp object in Javascript: http://jibbering.com/2002/4/httprequest.html On 6/13/05, Kall, Bruce A. [EMAIL PROTECTED] wrote: This is perhaps a javascript question Is there a way to post a form to a url without having a user submit from the form? I have a php web page that is a detailed form with a lot of fields. If the user does some work on this form and let's it sit, their session can time out (I had this happen to the user after it sat for 2 hours). Is there some way to have a timer in the page and have partial form results sent back to the server, but still leave the form on the screen as-is? In other words, I want to have the client periodically post the form data back to the server, but leave the same web page displayed. Thanks, Bruce -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] OT ??: Form posting without leaving form
Kall, Bruce A. wrote: This is perhaps a javascript question Is there a way to post a form to a url without having a user submit from the form? I have a php web page that is a detailed form with a lot of fields. If the user does some work on this form and let's it sit, their session can time out (I had this happen to the user after it sat for 2 hours). snip Hi Bruce A non-technical answer - is it not possible to break the form up into multiple pages? Each page can have only a few fields, and all you can do is store each page's submitted data and then recover what would be a partial entry of a large form by going to the last completed miniform when the user logs back in. My 2c Rory -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] OT ??: Form posting without leaving form
On Mon, June 13, 2005 10:28 am, Kall, Bruce A. said: I have a php web page that is a detailed form with a lot of fields. If the user does some work on this form and let's it sit, their session can time out (I had this happen to the user after it sat for 2 hours). Is there some way to have a timer in the page and have partial form results sent back to the server, but still leave the form on the screen as-is? In other words, I want to have the client periodically post the form data back to the server, but leave the same web page displayed. I also think it's cleaner to just let the user log back in and then process their POST data. You may need to not use the built-in session time-out, so that you have the data in context. Or, you may need to re-structure your application to archive timed-out session data somewhere, and resurrect it when needed. You can clean out really old archival data periodically. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] OT ??: Form posting without leaving form
Bruce, You can use JavaScript to automatically post the form after a set time. For example, you can use the 'SetTimeout' function or the 'onunload' event handler. You should Google these to get a better understanding of how they work. Listed below are two very basic examples. body onunload=JavaScriptFunction(); SetTimeout('JavaScriptFunction();', MilliSeconds); Kall, Bruce A. wrote: This is perhaps a javascript question Is there a way to post a form to a url without having a user submit from the form? I have a php web page that is a detailed form with a lot of fields. If the user does some work on this form and let's it sit, their session can time out (I had this happen to the user after it sat for 2 hours). snip Hi Bruce A non-technical answer - is it not possible to break the form up into multiple pages? Each page can have only a few fields, and all you can do is store each page's submitted data and then recover what would be a partial entry of a large form by going to the last completed miniform when the user logs back in. My 2c Rory -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] OT ??: Form posting without leaving form
This is perhaps a javascript question Is there a way to post a form to a url without having a user submit from the form? I have a php web page that is a detailed form with a lot of fields. If the user does some work on this form and let's it sit, their session can time out (I had this happen to the user after it sat for 2 hours). Is there some way to have a timer in the page and have partial form results sent back to the server, but still leave the form on the screen as-is? In other words, I want to have the client periodically post the form data back to the server, but leave the same web page displayed. Thanks, Bruce -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] OT ??: Form posting without leaving form
Check out the xmlhttp object in Javascript: http://jibbering.com/2002/4/httprequest.html On 6/13/05, Kall, Bruce A. [EMAIL PROTECTED] wrote: This is perhaps a javascript question Is there a way to post a form to a url without having a user submit from the form? I have a php web page that is a detailed form with a lot of fields. If the user does some work on this form and let's it sit, their session can time out (I had this happen to the user after it sat for 2 hours). Is there some way to have a timer in the page and have partial form results sent back to the server, but still leave the form on the screen as-is? In other words, I want to have the client periodically post the form data back to the server, but leave the same web page displayed. Thanks, Bruce -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] OT ??: Form posting without leaving form
Kall, Bruce A. wrote: I have a php web page that is a detailed form with a lot of fields. If the user does some work on this form and let's it sit, their session can time out (I had this happen to the user after it sat for 2 hours). Is there some way to have a timer in the page and have partial form results sent back to the server, but still leave the form on the screen as-is? Why not construct your application so that a user can enter the password again after timing out and continue? If I submit a form, and you tell me that I've timed out, I should be able to provide my password and not lose everything. You have all of the data in $_POST or $_GET. Do something with it. :-) There may be some client-side way to handle this, but it's definitely not necessary. Chris -- Chris Shiflett Brain Bulb, The PHP Consultancy http://brainbulb.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] OT ??: Form posting without leaving form
On Mon, 2005-06-13 at 17:26, Chris Shiflett wrote: Kall, Bruce A. wrote: I have a php web page that is a detailed form with a lot of fields. If the user does some work on this form and let's it sit, their session can time out (I had this happen to the user after it sat for 2 hours). Is there some way to have a timer in the page and have partial form results sent back to the server, but still leave the form on the screen as-is? Why not construct your application so that a user can enter the password again after timing out and continue? If I submit a form, and you tell me that I've timed out, I should be able to provide my password and not lose everything. You have all of the data in $_POST or $_GET. Do something with it. :-) There may be some client-side way to handle this, but it's definitely not necessary. Keepalive session ping :) Just retrieve some content via javascript that keeps the session going. I'm not necessarily advocating this for the best solution, but it is a client side solution with very little complexity. Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php