NetTalk Central

Author Topic: A little confused about implementing a calendar script  (Read 3042 times)

Mike Grigsby

  • Sr. Member
  • ****
  • Posts: 380
    • Yahoo Instant Messenger - onthedotsoftware
    • View Profile
    • MyHomeAssets! Software (among others)
A little confused about implementing a calendar script
« on: October 25, 2008, 10:46:12 AM »
Okay, a lot confused. It's the DHTML script at http://www.dhtmlgoodies.com/packages/dhtml-suite-for-applications/demos/demo-calendar-1.html.

So I'll add the dhtmlgoodies_calendar.js to my webserver scripts tab.

But I guess I need an embed to stuff this script in the middle of the page. I'm having trouble picturing it. My goal is to block out dates that are not available (as shown in the addinvaliddaterange method), but which embed do I put it in? Do I add a local variable field and put it in its embed somewhere? Thanks so much for your suggestions! MikeG

<script type="text/javascript">
   
   var myCalendarModel5 = new DHTMLSuite.calendarModel({ initialYear:2004,initialMonth:5,initialDay:20 });
   myCalendarModel5.addInvalidDateRange(false,{year: 2003,month:12,day:31});
   myCalendarModel5.addInvalidDateRange({year: 2005,month:1,day:1},false);
   myCalendarModel5.setLanguageCode('en');
   var myCalendar5 = new DHTMLSuite.calendar({ id:'calendar4',displayCloseButton:false,numberOfRowsInYearDropDown:12 } );
   myCalendar5.setCalendarModelReference(myCalendarModel5);
   myCalendar5.setTargetReference('calendarDiv4');
   myCalendar5.display();
   </script>
Mike Grigsby
Credify Systems
Central Oregon, USA

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11186
    • View Profile
Re: A little confused about implementing a calendar script
« Reply #1 on: October 27, 2008, 02:22:30 AM »
Hi Mike,

What procedure type are you adding this into?

Cheers
Bruce

Mike Grigsby

  • Sr. Member
  • ****
  • Posts: 380
    • Yahoo Instant Messenger - onthedotsoftware
    • View Profile
    • MyHomeAssets! Software (among others)
Re: A little confused about implementing a calendar script
« Reply #2 on: October 27, 2008, 10:16:34 AM »
A form.
Mike Grigsby
Credify Systems
Central Oregon, USA

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11186
    • View Profile
Re: A little confused about implementing a calendar script
« Reply #3 on: October 27, 2008, 10:46:39 PM »
Hi Mike,

Then I'd add the script somewhere inside the "generate form" routine.

as in
packet = clip(packet) & '<script>.....</script>'
do SendPacket

Cheers
Bruce

Mike Grigsby

  • Sr. Member
  • ****
  • Posts: 380
    • Yahoo Instant Messenger - onthedotsoftware
    • View Profile
    • MyHomeAssets! Software (among others)
Re: A little confused about implementing a calendar script
« Reply #4 on: October 27, 2008, 11:34:56 PM »
Thanks so much Bruce. I need to learn the template embed points.
Mike Grigsby
Credify Systems
Central Oregon, USA