R: [ok] Re: [PEAR-DEV] HTML_QuickForm_Liveseach Please comment, draft proposal
| From: | Giuseppe Dessì | Date: | Sat, 15 Oct 2005 08:45:39 +0000 |
| Subject: | R: [ok] Re: [PEAR-DEV] HTML_QuickForm_Liveseach Please comment, draft proposal | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-40209@lists.php.net to get a copy of this message | ||
-----Messaggio originale-----
Da: Joshua Eichorn [mailto:josh@bluga.net]
Inviato: sabato 15 ottobre 2005 0.14
A: Giuseppe Dessì
Cc: Bertrand Mansion; pear-dev@lists.php.net
Oggetto: [ok] Re: [PEAR-DEV] HTML_QuickForm_Liveseach Please comment, draft
proposal
Giuseppe Dessì wrote:
> Bertrand Mansion wrote:
>
>> Giuseppe Dessì wrote:
>>
>>
>>
>>
>>> Ok I understood when the first mail was already sent :D I can test
>>> if browser support javascript, and if browser support the
>>> XMLHTTPRequest object..
>>> But i dont know how to manage this field if the browser doesnt
>>> support this functionalities.
>>> 1) Dont display the field
>>> 2) A classic dropdown list with all elements
>>> 3) some ideas?
>>>
>>
>>
>> I think you could just display a normal text input.
>> The idea is to avoid the javascript to make errors if the functions
>> you use do not exist (especially the ones related to XMLHTTPRequest).
>>
>> BTW, do you think it would be worth the effort to have a look at the
>> PEAR AJAX package and use it with this element ? This would be the
>> first QF element that would make use of AJAX.
>>
>> Bertrand Mansion
>> Mamasam
>>
>>
>>
>>
> About normal text, i dont know if its a good idea, due to fact that if
> you are using this feature, then you must have a correlate id.
> if the browser do not support XMLHTTPRequest, I think to switch(adding
> some options) to an HTML_QuickForm_autocomplete, but it still use
> javascript.
> About AJAX, I think this is possible, but there will be some work to
> implement it.
> My fisrt objective is make this "add-on" working better than now, and
> after i think there will be a chance to get it work with AJAX :)
>
If your using XMLHttpRequest your doing AJAX already, if you use HTML_AJAX
things will be easier.
I don't have this code released but if you'll take a look at:
http://svn.bluga.net/HTML_AJAX/trunk/examples/queue_usage.php
You'll see a sample that implements the communication side of what your
trying using HTML_AJAX. The buffer makes sure that your not flooding the
server with requests.
Also note there are lots of ways this can be handled in HTML_AJAX and for
your case i might implement things slightly differently so that a stub class
wasn't needed, if you want some help moving this to HTML_AJAX let me know
and I'll see what i can do.
-josh
When i wrote on previous post "get it work with AJAX" i mean "with
HTML_AJAX" ;)
My principal goals are:
The user install the package, and to add a livesearch element with QF, he
must only write an $obj->addelement and write down (if needed) the script to
retrieve data. No javascript coding needed to do this.
With HTML_AJAX implement on my liveseacrh for QF, must the user write
javascript in his code?
(I think no...but non sure :))
Note that sincerely i dont like javascript coding..the class i wrote is my
unique big work with javascript :D, due to this
I wrote this add-ons...so the user write down only php code :)
I'll take a look to the queue_usage.php script.
Thank you for the support.
Giuseppe Dessi
P.s. sorry for my english ;)