Re: Update onBlur or onChange
| From: | Stefan Rusterholz | Date: | Mon, 22 Oct 2001 08:54:57 +0000 |
| Subject: | Re: Update onBlur or onChange | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-71805@lists.php.net to get a copy of this message | ||
>From: "KING OGNAJD" <django@theexcuse.com>
>To: <php-general@lists.php.net>
>Sent: Monday, October 22, 2001 9:33 AM
>Subject: [PHP] Update onBlur or onChange
>Helo:
>I¹m working on a form that I¹d like to have a feature that adds your total
>as items are selected. Currently, I¹ve got some javascript doing the job
but
>it only works in ie, and besides, I¹d rather use php if possible.
>The current prototype form lives at
>http://www.seatthole.com/order2.php
>Can anyone tell me if there¹s a way to update the total at the bottom of
the
>page in realtime as the user makes changes?
>Thanks...
>Django
PHP is a server-side language, which means that it had to be reloaded each
time you want to do an update which is not realtime. IMHO that's not that
what a user expects because it takes more time to send and reload than to
calculate the new price yourself ;-) (as long as you have a poor connection)
Two possible solutions:
-I think the javascript solution ist the best. I don't see any reason why it
doesn't run in Netscape (I didn't look at the code but I know that there is
a way to get it work)
-Second: Not realtime - total appears after sending it. You can combine this
solution with the first to avoid problems with browsers that have JavaScript
disabled (I'd recomend that anyway)
Regards
Stefan Rusterholz, s.rusterholz@interaktion.ch
----------------------------------
interaktion gmbh
Stefan Rusterholz
Zürichbergstrasse 17
8032 Zürich
----------------------------------
T. +41 1 253 19 55
F. +41 1 253 19 56
W3 www.interaktion.ch
----------------------------------