Re: HTML_QuickForm_Liveseach draft update

From: Date: Wed, 11 Jan 2006 14:01:53 +0000
Subject: Re: HTML_QuickForm_Liveseach draft update
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-40926@lists.php.net to get a copy of this message
David Coallier wrote:
Giuseppe Dessì wrote:
Hi all, finally i updated this proposal to work with HTML_AJAX
Smart move ;)
http://pear.php.net/pepr/pepr-proposal-show.php?id=308
@todo    Make the style variable as class, so the user can choose it before instatiate the element
@todo     Make HTML_AJAX_Queue_Interval_SingleBuffer variable
In the example page you can see the old version too (not dependent from HTMl_AJAX) so you can see differences. It's for me very useful to read comment and advices about it to make it better.
P.S. to HTML_AJAX developer: some advice to make the javascript part of this code more..."elegant" ? ;)
Which parts do you want to be more elegant ? But yeah, we are talking about respecting coding guidelines (same as pear code) for javascript. Just let me know the files you want and i'll start working on them to make them compliant.
Thanks in advance Giuseppe Dessì
-- David Coallier PHP Developer, Agora Production (http://agoraproduction.com) I don't know if "elegant" is the appropriate word :D
Here is the doubt 1) take a look to this file: http://clansworld.fastgaming.it/PEAR/QuickForm_Livesearch/form_live2.phps as you can see, i used the base example of ajax livesearch to make the script work. I used this method: for each livesearch element i add an callback obj (line 188) I don't know if it is the right way....but it work. 2) This problem seem to be related to QuickForm I used (as in example) this code to initialize the javascript class: [code] <script type='text/javascript'>//<![CDATA[ var remoteLiveSearch = new livesearch(callback); remoteLiveSearch.dispatcher.queue = 'rls'; HTML_AJAX.queues['rls'] = new HTML_AJAX_Queue_Interval_SingleBuffer(350); //]]> </script> [/code] but this code is written every time an livesearch element is created. Is there a way to write this piece of code one time? The main problem is that i don't know if the livesearch search element is the last one! Others thing next time :D Thank you

« previous php.pear.dev (#40926) next »