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

sending java script object to server

Expand Messages
  • rahul07mca2k3
    Hi, Using yui I am sending vuser input values to server. I have four arrays aComboValues = new Array(10); oComboValues = new Array(10); lComboValues = new
    Message 1 of 2 , Jan 25, 2007
    • 0 Attachment
      Hi,

      Using yui I am sending vuser input values to server.
      I have four arrays

      aComboValues = new Array(10);
      oComboValues = new Array(10);
      lComboValues = new Array(100);
      tValues = new Array(10);

      I have to send these values to server what I did for this was to use

      java script object

      var qConditions = {attributeId:aComboValues,
      operationId:oComboValues, values:tValues, logicalOperators:lComboValues};

      How can I send and collect this(qConditions)java script object to
      server using YUI.



      Waiting for your response.
      Thanks
    • tssha
      ... to use ... logicalOperators:lComboValues}; ... Serialise the JSON(http://www.json.org/json.js) and use Connection Manager to perform an HTTP POST to your
      Message 2 of 2 , Jan 26, 2007
      • 0 Attachment
        --- In ydn-javascript@yahoogroups.com, "rahul07mca2k3"
        <rahul07mca2k3@...> wrote:
        >
        > Hi,
        >
        > Using yui I am sending vuser input values to server.
        > I have four arrays
        >
        > aComboValues = new Array(10);
        > oComboValues = new Array(10);
        > lComboValues = new Array(100);
        > tValues = new Array(10);
        >
        > I have to send these values to server what I did for this was
        to use
        >
        > java script object
        >
        > var qConditions = {attributeId:aComboValues,
        > operationId:oComboValues, values:tValues,
        logicalOperators:lComboValues};
        >
        > How can I send and collect this(qConditions)java script object to
        > server using YUI.

        Serialise the JSON(http://www.json.org/json.js) and use Connection
        Manager to perform an HTTP POST to your server.

        Example:
        YAHOO.util.Connect.asyncRequest(
        'POST',
        'resourcePath',
        callbackObject,
        qConditions.toJSONString //from json.js
        );

        Regards,
        Thomas
      Your message has been successfully submitted and would be delivered to recipients shortly.