[PHP] auto-submit
Hi - I'm writing a multi-page php script that keeps track of state with a hidden variable in the html forms. It's all working well except I would like to know how to auto submit a form and change the state. For example when I'm in state 2 and the user enters some data and hits a submit button I want the script to change to state 3 - process some data in that state then go back to state 1. I want the transition to go back to state 1 without the user having to hit a submit button - i.e. I want the form to auto-submit. Is there a way to do this? Thanks for any help you can give. Jim
[PHP] auto submit
Is the folowing possible to do? I fill in a form and press submit. Then I read a record from a database. With this data it submits to the read submits url. After 10 seconds, it reads the next record and submits that data. etc etc So I don't have to push submit each time I want to submit. After 10 seconds it read the next record and submits again. Could this be done? So yes, how?
Re: [PHP] auto submit
At 03.04.2002 11:22, you wrote: Is the folowing possible to do? I fill in a form and press submit. Then I read a record from a database. With this data it submits to the read submits url. After 10 seconds, it reads the next record and submits that data. etc etc So I don't have to push submit each time I want to submit. After 10 seconds it read the next record and submits again. Could this be done? So yes, how? You can do this, if your clients browser has JavaScript enabled. Then you could use JavaScript - www.javascript.com. And again, PHP is on your server and is not able to push something to your client except he/she asked for it (that´s why you have to use JavaScript). To get your page refreshed (thi only askes about a new copy of your page) you could use header() or a metatag like meta http-equiv=refresh content=10; URL=yourpage You can place this meta anywhere in your code (BUT that´s not html-conform, but works on the main browsers, (don´t know about NS 6 and mozilla)) HTH Oliver -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] auto submit
Yes, An idea I'd love to throw up here would be not letting the user know you're spying him: Make a Java Script function (yes, you will need JavaScript for that) that has timeout every 10 seconds. Use JS unction escape() and read the field values of your form assigning them to the JS variables after what, load a graphic with the JS vars passed in the IMG SRC link each 10 seconds passed. Your graphic will actually be a PHP script that records the data and does all kind of grows things, yet outputs just some silly image headers. This sway user has no clue (or almost) that what he's typing in your form you're already being collecting, even so he pressed no submit buttons yet. I made an intranet editor that had this failure-free feature similar to MS Word. Sincerely, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.com -Original Message- From: Martin Kampherbeek [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 03, 2002 11:23 AM To: [EMAIL PROTECTED] Subject: [PHP] auto submit Is the folowing possible to do? I fill in a form and press submit. Then I read a record from a database. With this data it submits to the read submits url. After 10 seconds, it reads the next record and submits that data. etc etc So I don't have to push submit each time I want to submit. After 10 seconds it read the next record and submits again. Could this be done? So yes, how? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Auto submit form, How?
How do I auto load or auto submit a form on the same page? I don't want to have to press the submit button instead just click on a value in the drop down form and it loads (I am lazy). Using php4.something -- This email was sent using w3mail. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Auto submit form, How?
http://www.devguru.com/Technologies/ecmascript/quickref/select.html Javascript. Use onBlur or onChange and call document.formname.submit(). Pete. Fates [EMAIL PROTECTED] wrote in message 20010629125135.ELXV13240.femail10.sdc1.sfba.home.com@localhost">news:20010629125135.ELXV13240.femail10.sdc1.sfba.home.com@localhost... How do I auto load or auto submit a form on the same page? I don't want to have to press the submit button instead just click on a value in the drop down form and it loads (I am lazy). Using php4.something -- This email was sent using w3mail. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Auto submit form
How do I autoload a selection from a drop down menu form based on the selection without having to click a submit button? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Auto submit form
David wrote: How do I autoload a selection from a drop down menu form based on the selection without having to click a submit button? Everything to do with forms is either to do with hitting a submit button (call to a server) or without (which means that the browser/client is handling it), so anything you want to do (like auto-submits, dynamic pop-ups, etc etc) is done via the browser -- Javascript would be the obvious one. I Suggest looking at onChange and onBlur attributes of FORM elements for more info. As per usual, you'll probably be able to learn quite a bit by looking at the HTML/JavaScript source code of a page that already does it. It's not really PHP related, try to think of it as a HTML / browser / client side issue. Also, be aware that you shoudl still prolly include a submit button, so that people with stone age browsers, or worse still, javascript turned off, can still submit the form and use your site. I saw an e-commerce site once that ignored this basic little rule, thus preventing sales to those without javascript. I don't think any online store is doing well enough yet to start excluding customers :) Justin French Creative Director Indent.com.au -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Auto submit form, How?
Fates [EMAIL PROTECTED] wrote: How do I auto load or auto submit a form on the same page? I don't want to have to press the submit button instead just click on a value in the drop down form and it loads (I am lazy). use javascript, to find you answer look here http://www.developer.irt.org/script/script.htm -- Henrik Hansen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]