tags:

views:

15

answers:

0

I'm looking to use YAHOO.util.Connect.asyncRequest() to get updated information for my DataTable, so I can bind the request to a form.

YAHOO.util.Connect.setForm(this.myForm);
YAHOO.util.Connect.asyncRequest("GET","/foo/bar/?", oCallBack);

instead of:

this.myDataSource.sendRequest(myRequest, oCallBack);

The issue is that asyncRequest passes different params to the call back function than sendRequest.

The way I see it I have 2 options:

  1. Use sendRequest and manually code a RequestBuilder, since YUI2 does not have a Form.serialize, or
  2. Use asyncRequest and use some combination of handleResponse/parseJSONData to craft the correct parameter objects. Though it looks like I would also need to come up with the original request and payload objects some how.

Does anyone see a better option? or an easier way to implement either of these?

Thanks,