Re: Auto submit form

From: Date: Sat, 30 Jun 2001 15:56:27 +0000
Subject: Re: Auto submit form
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-55666@lists.php.net to get a copy of this message
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

« previous php.general (#55666) next »