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

Re: [ydn-javascript] Re: Connection Manager: argument

Expand Messages
  • Jesse Vitrone
    It was a confusing example since the argValue is the 1 at the bottom, the 1 at the top is just the responseText that the php page from the asyncRequest
    Message 1 of 8 , Mar 24, 2006
    • 0 Attachment
      It was a confusing example since the argValue is the "1" at the bottom, the "1" at the top is just the responseText that the php page from the asyncRequest calls, you can see that "1" here if you hit http://whatshouldisay.com/test/yahoo/sampleService.php

      I updated the example now so the argValue returns "My Arg Value", as you can see here:
      http://www.whatshouldisay.com/test/yahoo/ajaxFade.html

      I think you might be confusing the JSON javascript arguments with parameters that are passed to the actual service. 
      *someone please double check my logic here*
      The arguments that you list in the JSON notation are not passed to the server side service, you have to pass those as regular query parameters, or in a form submit.  The JSON arguments are just values that get passed along to your javascript callback.

      Hope this helps,
          Jesse


      Thomas S. Sha wrote:
      --- In ydn-javascript@yahoogroups.com, "Tom Longson" <nym@...> wrote:
      >
      > It seems like your web service returns 1 regardless of argValue... are
      > you sure it's getting passed to the service correctly?
      >
      > Thanks,
      > Tom

      In his example, he(Jesse) is using the following callback object:
      var callback = { success:responseSuccess, failure:responseFailure,
      argument: {argValue:1}};

      So in this case, argument is an object literal with a property
      *argValue* value of 1.

      The argument property value can be a string, int, array, or object so
      you have the latitude to pass whichever value(s) you desire.

      Regards,
      Thomas




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