How do I return the onsuccess resonsetext back to the function?

getDataJSON always returns undefined.

function getDataJSON(psType,psParams)
{
    var sParms="someurl"+psType+psParams

    var jsonRequest = new Request.JSON(
    {
        url: sParms,
        noCache: true,
        async: false,
        onSuccess: function(searchResults){
            return searchResults;
        },
        onFailure: function(errfail) {
            alert(errfail);
            return "";
        }
    }).send();

}

thanks for any help

Reply via email to