Loading ...
Sorry, an error occurred while loading the content.
 

Retained Dialog XHR parameters in new XHR, why ??

Expand Messages
  • chaluwa
    Hello people, I have this dialog (YAHOO.widget.Dialog) that I am using to send some values through XHR to my server, and I have its callback set up thus :
    Message 1 of 2 , Jan 13, 2008
      Hello people, I have this dialog (YAHOO.widget.Dialog) that I am using
      to send some values through XHR to my server, and I have its callback
      set up thus :

      dialog.callback = {
      success: function(o){
      var resp = jsonParser.fromXMLStr(o.responseText);
      if(resp.entry.status == 200){
      dataSource.sendRequest('mode=budget_entries',
      dataTable.onDataReturnInsertRows, dataTable
      );
      }
      }
      };

      jsonParser is my xml to json parser, and I am doing some sort of
      status check on the server response (with responseText), never mind
      all that, dataSource is a YAHOO.util.DataSource object that I am
      trying to refresh so as to update a datatable object I built on the
      said dataSource object. Now here is the issue, investigating with
      firebug, I observed that the parameters and values of the just
      submitted dialog are also appended to the request of the dataSource
      object, resulting in a request string similar to this :

      query=create_budget_entries&proj=2&amount=5453434&mode=budget_entries

      instead of just this :

      mode=budget_entries

      the extra are from the dialog just submitted, causing some unwanted
      results to occur at my server. Why are the dialog's parameters
      appended, how can I get rid of them.
    • Satyen Desai
      Hi, Sorry about the delayed response. Which version of YUI are you using? You re probably hitting an issue which was fixed in YUI 2.4.0:
      Message 2 of 2 , Feb 4, 2008
        Hi,
        Sorry about the delayed response.

        Which version of YUI are you using? You're probably hitting an issue
        which was fixed in YUI 2.4.0:

        http://sourceforge.net/tracker/index.php?func=detail&aid=1804153&group_i
        d=165715&atid=836476

        If you can't upgrade, you can work around the issue by calling
        YAHOO.util.Connect.resetFormState(), before you send out the DataSource
        request.

        Hope that helps,
        Satyen
      Your message has been successfully submitted and would be delivered to recipients shortly.