Justtechjobs.com Find a programming school near you






Online Campus Both


php-general | 2001062

Re: [PHP] Auto submit form From: Justin French (justin <email protected>)
Date: 06/30/01

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: php-general-unsubscribe <email protected>
For additional commands, e-mail: php-general-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>