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

Re: [ydn-javascript] Simple Date Click to Open New Page

Expand Messages
  • Jefferson Prestes
    Hi Rob, I do something like this using Calendar2up_Cal. Set in setChildFunction method example: nameOfMyCalenderObject.setChildFunction( onSelect ,
    Message 1 of 2 , Feb 19, 2006
      Hi Rob,
       
      I do something like this using Calendar2up_Cal. Set in setChildFunction method example: nameOfMyCalenderObject.setChildFunction("onSelect", afterClickInDate);
      afterClickInDate is a new function like this:
       
      function afterClickInDate()        {
          var myDate = nameOfMyCalenderObject.getSelectedDates()[0];
          var formatedDate = myDate.getFullYear() + "-" + ((myDate.getMonth())+1) + "-" + myDate.getDate();
          document.location.replace('http://www.fake.com/index.php?date=' + formatedDate);
      }
       
      Done. When your user click in some date the afterClickInDate will be fired.
       
      Use AJAX is a bit more complex. I invite you to visit www.novatrix.com.br/ajax/. There're some examples and some js library that you can use if desire.
       
       
      Good studies,
       
       
      Jefferson Prestes
      Novatrix Technologies
       
       
       
      ----- Original Message -----
      From: Rob
      Sent: Sunday, February 19, 2006 5:35 PM
      Subject: [ydn-javascript] Simple Date Click to Open New Page

      I've got the Calender working, yet I am confused as to how I would
      simply have it open up a web page by click on the date.  For example I
      would like the date to either link to a page: http://www.fake.com?
      date=2006-03-01 or make an ajax call to populate a div with a script
      with contents related to the supplied date.  Yes, I'm new to
      javascript : ) Any help would be great great great. 




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