|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Hi
I have written a new component that can be included in your form, and allows the user to search a data source by entering the search term(s) and using Ajax to return a list of results in a dropdown control, from which the user can select the desired item. It uses the prototype JavaScript library, which you need to get from their website. You can view a demo and download the source at: http://jeremywebdeveloper.co.za/code/ajaxsearch/ -- Jeremy O'Connor |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
[snip]
I have written a new component that can be included in your form, and allows the user to search a data source by entering the search term(s) and using Ajax to return a list of results in a dropdown control, from which the user can select the desired item. It uses the prototype JavaScript library, which you need to get from their website. You can view a demo and download the source at: http://jeremywebdeveloper.co.za/code/ajaxsearch/ [/snip] Cool...I'd have the 'submit' button hidden until results were returned so as to avoid user confusion. |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
""Jay Blanchard"" <jblanchard@pocket.com> wrote in message
news:9F6B7518E92167499E0168D01C2D8D9C39101E@YGEX01 WAL.onecall.local... > Cool...I'd have the 'submit' button hidden until results were returned > so as to avoid user confusion. Yes, something to add in a later version of the component. -- Jeremy O'Connor |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
On Tue, Apr 8, 2008 at 7:41 AM, Jeremy O'Connor <joconnor@netactive.co.za>
wrote: > Hi > > I have written a new component that can be included in your form, and > allows > the user to search a data source by entering the search term(s) and using > Ajax to return a list of results in a dropdown control, from which the > user > can select the desired item. It uses the prototype JavaScript library, > which > you need to get from their website. You can view a demo and download the > source at: http://jeremywebdeveloper.co.za/code/ajaxsearch/ they pretty much have that in the scriptacuous lib under Ajax.Autocompleter, atm http://wiki.script.aculo.us/scriptac....Autocompleter http://demo.script.aculo.us/ajax/autocompleter http://demo.script.aculo.us/ajax/aut...ter_customized plus they have a client side version as well to mitigate bandwidth consumption for small data sets. http://wiki.script.aculo.us/scriptac...ompleter.Local -nathan |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
On Tue, Apr 8, 2008 at 12:37 PM, Nathan Nobbe <quickshiftin@gmail.com> wrote:
> they pretty much have that in the scriptacuous lib under Ajax.Autocompleter, > atm > > http://wiki.script.aculo.us/scriptac....Autocompleter > http://demo.script.aculo.us/ajax/autocompleter > http://demo.script.aculo.us/ajax/aut...ter_customized > > plus they have a client side version as well to mitigate bandwidth > consumption for small data sets. > > http://wiki.script.aculo.us/scriptac...ompleter.Local > > -nathan > As long as we're raining on parades ![]() http://developer.yahoo.com/yui/autocomplete/ |
|
|
|
#6 |
|
Messages: n/a
Hébergeur: |
On Tue, Apr 8, 2008 at 10:50 AM, Eric Butera <eric.butera@gmail.com> wrote:
> On Tue, Apr 8, 2008 at 12:37 PM, Nathan Nobbe <quickshiftin@gmail.com> > wrote: > > they pretty much have that in the scriptacuous lib under > Ajax.Autocompleter, > > atm > > > > http://wiki.script.aculo.us/scriptac....Autocompleter > > http://demo.script.aculo.us/ajax/autocompleter > > http://demo.script.aculo.us/ajax/aut...ter_customized > > > > plus they have a client side version as well to mitigate bandwidth > > consumption for small data sets. > > > > http://wiki.script.aculo.us/scriptac...ompleter.Local > > > > -nathan > > > > > As long as we're raining on parades ![]() > > http://developer.yahoo.com/yui/autocomplete/ lol! ya, havent finished parsing through this one; but a good read on the topic http://extjs.com/forum/showthread.php?t=551 btw; planning on digging into extJs once i get a chance to take a piss :O -nathan |
|
|
|
#7 |
|
Messages: n/a
Hébergeur: |
On Tue, Apr 8, 2008 at 2:10 PM, Nathan Nobbe <quickshiftin@gmail.com> wrote:
> btw; planning on digging into extJs once i get a chance to take a piss :O I've heard a lot of good things about that. Let me know what you think, after you piss of course. =) |
|
|
|
#8 |
|
Messages: n/a
Hébergeur: |
>As long as we're raining on parades
![]() > >http://developer.yahoo.com/yui/autocomplete/ > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php And to continue: http://www.webbytedd.com/c/ajax-pop-down/ Cheers, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com |
|
|
|
#9 |
|
Messages: n/a
Hébergeur: |
On Tue, Apr 8, 2008 at 3:53 PM, tedd <tedd.sperling@gmail.com> wrote:
> As long as we're raining on parades ![]() > > > > http://developer.yahoo.com/yui/autocomplete/ > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > And to continue: > > http://www.webbytedd.com/c/ajax-pop-down/ thats the idea ![]() -nathan |
|
|
|
#10 |
|
Messages: n/a
Hébergeur: |
At 4:17 PM -0600 4/8/08, Nathan Nobbe wrote:
>On Tue, Apr 8, 2008 at 3:53 PM, tedd ><<mailto:tedd.sperling@gmail.com>tedd.sperling@gm ail.com> wrote: > >As long as we're raining on parades ![]() > ><http://developer.yahoo.com/yui/autocomplete/>http://developer.yahoo.com/yui/autocomplete/ > >-- > >PHP General Mailing List (<http://www.php.net/>http://www.php.net/) >To unsubscribe, visit: ><http://www.php.net/unsub.php>http://www.php.net/unsub.php > > >And to continue: > ><http://www.webbytedd.com/c/ajax-pop-down/>http://www.webbytedd.com/c/ajax-pop-down/ > > >thats the idea ![]() > >-nathan There are no new ideas, just different spins to old ones. Cheers, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com |
|
|
|
#11 |
|
Messages: n/a
Hébergeur: |
On Tue, Apr 8, 2008 at 5:12 PM, tedd <tedd.sperling@gmail.com> wrote:
> At 4:17 PM -0600 4/8/08, Nathan Nobbe wrote: > > > On Tue, Apr 8, 2008 at 3:53 PM, tedd <<mailto:tedd.sperling@gmail.com> > > tedd.sperling@gmail.com> wrote: > > > > As long as we're raining on parades ![]() > > > > <http://developer.yahoo.com/yui/autocomplete/> > > http://developer.yahoo.com/yui/autocomplete/ > > > > -- > > > > PHP General Mailing List (<http://www.php.net/>http://www.php.net/) > > To unsubscribe, visit: <http://www.php.net/unsub.php> > > http://www.php.net/unsub.php > > > > > > And to continue: > > > > <http://www.webbytedd.com/c/ajax-pop-down/> > > http://www.webbytedd.com/c/ajax-pop-down/ > > > > > > thats the idea ![]() > > > > -nathan > > > > There are no new ideas, just different spins to old ones. i was alluding to the automatic invocation of ajax requests (the norm) in your example vs. the required user interaction in the OPs. -nathan |
|
|
|
#12 |
|
Messages: n/a
Hébergeur: |
""Nathan Nobbe"" <quickshiftin@gmail.com> wrote in message news:7dd2dc0b0804080937x720af40n8f6850e807e246bd@m ail.gmail.com... > On Tue, Apr 8, 2008 at 7:41 AM, Jeremy O'Connor <joconnor@netactive.co.za> > wrote: > they pretty much have that in the scriptacuous lib under > Ajax.Autocompleter, > atm > OK, but my control only does the Ajax call when the user clicks the Go button, whereas the scriptaculous library does an Ajax call everytime the user presses a key. -- Jeremy O'Connor |
|
|
|
#13 |
|
Messages: n/a
Hébergeur: |
On Wed, Apr 9, 2008 at 2:34 AM, Jeremy O'Connor
<joconnor@netactive.co.za> wrote: > OK, but my control only does the Ajax call when the user clicks the Go > button, whereas the scriptaculous library does an Ajax call everytime the > user presses a key. Any library should be flexible enough to register event listeners on whatever trigger needed. The event itself isn't as important as how things are handled. I use YUI because it lets me focus on my work instead of browser quirks. It is a little heavier but that is okay because they have a team dedicated to testing all the A grade browsers so I don't have to. |
|
|
|
#14 |
|
Messages: n/a
Hébergeur: |
On Wed, Apr 9, 2008 at 2:34 AM, Jeremy O'Connor <joconnor@netactive.co.za>
wrote: > > ""Nathan Nobbe"" <quickshiftin@gmail.com> wrote in message > news:7dd2dc0b0804080937x720af40n8f6850e807e246bd@m ail.gmail.com... > > On Tue, Apr 8, 2008 at 7:41 AM, Jeremy O'Connor < > joconnor@netactive.co.za> > > wrote: > > they pretty much have that in the scriptacuous lib under > > Ajax.Autocompleter, > > atm > > > > OK, but my control only does the Ajax call when the user clicks the Go > button, whereas the scriptaculous library does an Ajax call everytime the > user presses a key. not quite; it checks to see if anything has been entered in intervals that are specified by the frequency parameter. this allows users to potentially enter in several characters depending on the frequency interval. with the stock setting, i was able to type about 5 or 6 characters before an ajax request was issued. and its smart enough not to just incite an ajax request at every interval, because during the intervals, it checks to see if anything has been entered. you can easily analyze this behavior w/ the demo links i posted and firebugs' net tab. furthermore it has the tokens option. tokens enforce a tighter requirement on whether or not an autocompletion request will be invoked; in the case of Ajax.Autocompleter that means sending an ajax request to the server. not only do characters have to have been entered during the frequency interval, but one of the token characters has to have been entered. pretty slick if u ask me. you could easily add support for explicit autocompletion request (eg. by clicking a button) by subclassing Autocompleter.Base or one of the current subclasses (Ajax.Autocompleter or Autocompleter.Local) as long as those actually made sense for what you were trying to do. so scriptaculous has supplied performance conscience, convenient (for users and developers) controls and the ability to extend upon their work (using prototypes oo features). -nathan |
|
|
|
#15 |
|
Messages: n/a
Hébergeur: |
On Wed, Apr 9, 2008 at 7:50 AM, Eric Butera <eric.butera@gmail.com> wrote:
> On Wed, Apr 9, 2008 at 2:34 AM, Jeremy O'Connor > <joconnor@netactive.co.za> wrote: > > OK, but my control only does the Ajax call when the user clicks the Go > > button, whereas the scriptaculous library does an Ajax call everytime > the > > user presses a key. > > Any library should be flexible enough to register event listeners on > whatever trigger needed. The event itself isn't as important as how > things are handled. > > I use YUI because it lets me focus on my work instead of browser > quirks. It is a little heavier but that is okay because they have a > team dedicated to testing all the A grade browsers so I don't have to. any js lib worth mentioning these days fits that description and prototype / scriptaculous is no exception. i wish it were modular, so i didnt have to send the whole damn library out to the browser on every request, when i might just need a few classes. whats more, although scriptaculous does provide some ui components and controls out-of-the-box, they dont appear to have nearly the gamut of extJs.. one of the things thats great about prototype is that they sort of map javascripts oo model to something of the paradigm that php has; primarily inheritance. i believe extJs errs more on the 'you need to understand js' side of things. -nathan |
|
|
|
#16 |
|
Messages: n/a
Hébergeur: |
On Wed, Apr 9, 2008 at 8:07 AM, Nathan Nobbe <quickshiftin@gmail.com> wrote:
> > On Wed, Apr 9, 2008 at 7:50 AM, Eric Butera <eric.butera@gmail.com> wrote: > > > > On Wed, Apr 9, 2008 at 2:34 AM, Jeremy O'Connor > > > > <joconnor@netactive.co.za> wrote: > > > > > OK, but my control only does the Ajax call when the user clicks the Go > > > button, whereas the scriptaculous library does an Ajax call everytime > the > > > user presses a key. > > > > Any library should be flexible enough to register event listeners on > > whatever trigger needed. The event itself isn't as important as how > > things are handled. > > > > I use YUI because it lets me focus on my work instead of browser > > quirks. It is a little heavier but that is okay because they have a > > team dedicated to testing all the A grade browsers so I don't have to. > > any js lib worth mentioning these days fits that description and prototype / > scriptaculous is no exception. i wish it were modular, so i didnt have to > send the whole damn library out to the browser on every request, when i > might just need a few classes. whats more, although scriptaculous does > provide some ui components and controls out-of-the-box, they dont appear to > have nearly the gamut of extJs.. > one of the things thats great about prototype is that they sort of map > javascripts oo model to something of the paradigm that php has; primarily > inheritance. i believe extJs errs more on the 'you need to understand js' > side of things. > > -nathan > > I figured as much. The YUI stuff is all very split up into defined modules such as DOM, Event, Connection, etc. Of course they all seem to depend on each other, so I end up sending like 8 files over the wire. I create a single file to stitch them together though, gzip it, and send it with a far future expire header. So in the end it really isn't the worst thing. I used prototype before but I was upset with my requests getting out of order when I was doing stuff. Then there is lots of talk about how it doesn't play nice with other scripts. The YUI stuff is all namespaced out. I also had compatibility issues with prototype using opera. But that was years ago and I'm sure everything is fine now, but I've already left. ![]() |
|
|
|
#17 |
|
Messages: n/a
Hébergeur: |
Eric Butera Ãrta:
> On Wed, Apr 9, 2008 at 8:07 AM, Nathan Nobbe <quickshiftin@gmail.com> wrote: >> On Wed, Apr 9, 2008 at 7:50 AM, Eric Butera <eric.butera@gmail.com> wrote: >> >> >>> On Wed, Apr 9, 2008 at 2:34 AM, Jeremy O'Connor >>> >>> <joconnor@netactive.co.za> wrote: >>> >>>> OK, but my control only does the Ajax call when the user clicks the Go >>>> button, whereas the scriptaculous library does an Ajax call everytime >> the >>>> user presses a key. >>> Any library should be flexible enough to register event listeners on >>> whatever trigger needed. The event itself isn't as important as how >>> things are handled. >>> >>> I use YUI because it lets me focus on my work instead of browser >>> quirks. It is a little heavier but that is okay because they have a >>> team dedicated to testing all the A grade browsers so I don't have to. >> any js lib worth mentioning these days fits that description and prototype / >> scriptaculous is no exception. i wish it were modular, so i didnt have to >> send the whole damn library out to the browser on every request, when i >> might just need a few classes. whats more, although scriptaculous does >> provide some ui components and controls out-of-the-box, they dont appear to >> have nearly the gamut of extJs.. >> one of the things thats great about prototype is that they sort of map >> javascripts oo model to something of the paradigm that php has; primarily >> inheritance. i believe extJs errs more on the 'you need to understand js' >> side of things. >> >> -nathan >> >> > > I figured as much. > > The YUI stuff is all very split up into defined modules such as DOM, > Event, Connection, etc. Of course they all seem to depend on each > other, so I end up sending like 8 files over the wire. I create a > single file to stitch them together though, gzip it, and send it with > a far future expire header. So in the end it really isn't the worst > thing. > > I used prototype before but I was upset with my requests getting out > of order when I was doing stuff. Then there is lots of talk about how > it doesn't play nice with other scripts. The YUI stuff is all > namespaced out. I also had compatibility issues with prototype using > opera. But that was years ago and I'm sure everything is fine now, > but I've already left. ![]() > I use prototype together with some parts of YUI, some parts of ExtJS, TinyMCE, and a bunch of my own scripts, and there is no interference between them. And it all seems to work on the latest opera. greets, Zoltán Németh |
|
![]() |
| Outils de la discussion | |
|
|