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

RE: [ydn-javascript] how to make an ajax call when clicking on date in yahoo calendar.

Expand Messages
  • Satyen Desai
    Hi, I m not familiar with Rails or the AJAX observer, but you can take a look at the YUI s Connection Manager to programmatically kick of a new XHR request, as
    Message 1 of 2 , Apr 9, 2008
    • 0 Attachment
      Hi,
      I'm not familiar with Rails or the AJAX observer, but you can take a look at the YUI's Connection Manager to programmatically kick of a new XHR request, as part of your Calendar selectEvent handler.

      http://developer.yahoo.com/yui/connection/

      From a quick search, it seems like Rails/AJAX Observer is designed to poll a given form field and every time it detects a new value in the field it dispatches an XHR request to the Rails controller, to update server state.

      If you can identify the set of query parameters your Rails controller expects from AJAX Observer for the current page, you can manually recreate the query (or use Connection Manager's setForm capabilities, to mine this data from an existing form) and use YUI Connection Manager to dispatch the request programmatically, as opposed to waiting for the Observer polling to dispatch the request.

      Hope that helps.
      Satyen

      ________________________________________
      From: ydn-javascript@yahoogroups.com [mailto:ydn-javascript@yahoogroups.com] On Behalf Of bagam_venkat
      Sent: Tuesday, April 01, 2008 8:58 AM
      To: ydn-javascript@yahoogroups.com
      Subject: [ydn-javascript] how to make an ajax call when clicking on date in yahoo calendar.

      Hi all, i am pretty much new to yahoo calendar. I am using the
      calendar component in my rails app.I have such a scenario that when I
      click on a particular date, a call to server side action is made to
      store the date selected. Right now, to deal with this issue, I used a
      not-so-good technique. I have a hiden form-field and upon cliking a
      date, selectEvent trigers and updating the form-field value. Using the
      AJAX observer, am making XMLHttp request to the server. But this is
      not working always. Is there any way to make an ajax call upon
      clicking a date? any help appreciated...

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