O'Reilly logo

MooTools 1.3 Cookbook by Jay Larry G. Johnston

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Querying Mr. Clean's MP3 list!

Once our MP3 list gets too long to manage, users will desire a means of sorting through the rubbish and finding only the really good tunes.

Getting ready

This recipe launches off the work we accomplished in the previous recipe. Be familiar with that and then watch for the query data to be sent to the server-side script below.

How to do it...

There is but one small change here; it only adds a few lines of code. We grab the value of the input box and pass it as the optional argument. The server-side script then cleans this value, and uses it in a matching glob to find files like that string:

function send_query() { // prepare the data to send var el = $('mp3_query'); data = {'mp3_query':el.get('value')}; // make the actual ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required