Re: how to use HTML_AJAX for dynamic drop menu creation
| From: | Octavi Fors | Date: | Fri, 21 Apr 2006 08:07:03 +0000 |
| Subject: | Re: how to use HTML_AJAX for dynamic drop menu creation | ||
| References: | 1 2 3 4 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-23791@lists.php.net to get a copy of this message | ||
Dear Josh,
thanks for helping and giving the general scheme you suggest.
The MenuExample demo posted at http://htmlajax.org/materials/HTML_AJAX_Presentation/MenuExample/ seems to be exactly what I want. However, I don't see the source code (both html/js and php) available either in the same website or in the local PEAR/HTML/AJAX directory. Does anybody know where I can get the code of this example?
BTW, I'm running PHP 4.3.10. Is the note posted in the url above:
"Note that the demo's won't work on php4 unless you update the controller.php in each to register method names with the correct case."
a concern for that Menu example? How should I adapt it to make it work?
Thanks in advance,
******************************************************
Octavi Fors
Universitat de Barcelona. Àrea de Tecnologies.
Aplicacions.
mailto:ofors@ub.edu
*******************************************************
On Tue, 18 Apr 2006, Joshua Eichorn wrote:
Octavi Fors wrote:Hi, I am in the need of dynamically generate a drop menu (drop2) whose elements are function of the option value selected in another drop menu (drop1). Both menus are feeded via PEAR:DB database connection. HTML_AJAX seemes to be a good choice for that. However, I'm totally newbie in AJAX and after reading for some examples and documentation I am still stuck and cannot realize what my application should look like. I would be very grateful if somebody can bring me some light in this and make me start in this promising world of AJAX :-) Thanks in advance, ****************************************************** Octavi Fors Universitat de Barcelona. Àrea de Tecnologies. Aplicacions. mailto:ofors@ub.edu *******************************************************Your basic app structure would be: Page that generates the original html/javascript ajax.php (contains an instance of HTML_AJAX_Server and registers a class for giving the values of the second menu) when drop1 is selected is uses the remote stub of the option generation class to make an ajax call passing in the selected option the callback for the remote method updates drop2 I can give you more details if needed -josh