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

Re: Newbie connection manager question...

Expand Messages
  • tssha
    ... ... Remove the trailing comma after failure:handleFailure so that the callback looks like this: var callback = { success:handleSuccess,
    Message 1 of 2 , Apr 2 12:25 PM
    • 0 Attachment
      --- In ydn-javascript@yahoogroups.com, "smehrabi" <smehrabi@...> wrote:
      >
      > Hi folks,
      >
      > I'm trying to do the following with the YUI Connection Manager.
      >
      > I am taking an emailAddress from a form and making a request to server
      > to check if th eemail address is already being used. If it is in use
      > I'm sending an echo response as "Taken" and if it is not taken then
      > the response is "Good".
      >
      > Problem I am having is I can't do a if(o.responseText == "Taken") { do
      > this } else { do that };
      >
      > Can someone tell me what is wrong with my javascript?

      <snip>

      > var callback =
      > {
      > success:handleSuccess,
      > failure:handleFailure,
      > };

      Remove the trailing comma after "failure:handleFailure" so that the
      callback looks like this:

      var callback =
      {
      success:handleSuccess,
      failure:handleFailure
      };

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