logo

New Response

« Return to the blog entry

You are replying to:

    • avatar
    • Jayaprakash
    • Posted on Thu 30 Apr 2009 06:48 AM

    Hi Jake,

    I don't think you need to edit the source code of YUI DataSource for altering the URL used for getting the data.

    Now you need to use a url like the following:

    getNames?OpenAgent&query=typed%20value&foo=foo

    var oDS = new YAHOO.util.XHRDataSource("getNames?OpenAgent");

    oDS.generateRequest = function(queryValue){

    console.log(queryValue) //This will be the entire value typed by user.

    return "&query=" + queryValue + "foo=foo";

    }

    The above code will do what you wanted without altering the source code of the framework.

    Regards

    JP

Your Comments

Name:
E-mail:
(optional)
Website:
(optional)
Comment: