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 ...

Get MooTools 1.3 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.