Create an appointment in javascript

I want to create an appointment in Javascript. I have problems specifying the dates/times of the meeting. Lotus Notes complains about the format of the dates/times values…

Do you have any comments on the folliwing code?

doc.replaceItemValue(“form”,“appointment”);

doc.replaceItemValue(“appointmenttype”,“3”);

doc.replaceItemValue(“chair”, mymail);

doc.replaceItemValue(“subject” , "Task ");

doc.replaceItemValue(“sendto”, anothermail );

doc.replaceItemValue(“StartDateTime”, “01/04/2008 13:00”);

doc.replaceItemValue(“StartTime”,“01/04/2008 13:00”);

doc.replaceItemValue(“StartDate”,“01/04/2008 13:00”);

doc.replaceItemValue(“EndDate”, “01/05/2008 13:00”);

doc.replaceItemValue(“EndDateTime”, “01/05/2008 13:00”);

doc.replaceItemValue(“EndTime”,“01/05/2008 13:00”);

doc.replaceItemValue(“CalendarDateTime”, “01/04/08 13:00”);

thanks in advance !

Subject: Create an appointment in javascript

You mean lotusscript.

You are setting the dates with a string. Try the CDat function to convert the string to a date.

doc.replaceItemValue(“StartDateTime”, CDat(“01/04/2008 13:00:00”))

Subject: RE: Create an appointment in javascript

I really mean Javascript !!I can do pretty much with it but I fail using the dates for the appointments although the simple string format is accepted when I schedule a task (using the DueDate and StartDate parameter).

Maybe there is a trick in Javascrpt…

Subject: Java or JavaScript?

It appears to me that you’re using the Document class in Java. Are you calling this from JavaScript?

Java != JavaScript, but you can do some things like this in JS if you have access to a java applet…

Subject: RE: Java or JavaScript?

yes, i am doing this entirely in JS. i use the COM objects provided by Lotus Notes (nlsxbe.dll).it seems that the dates/times objects are not supported (calling session.createdatetime("01/03/2007) for instance).

I did not find any solution to that lack.

how would you do with a Java applet? do you connect to the Domino server directly? do you user the NSCO.jar and Notes.jar libs ?

thanks !

Subject: RE: Java or JavaScript?

I’m not sure exactly how it works, but I remember a few years back seeing something at a conference. Basically you make a 1x1 applet in Java which provides access to the various Lotus objects. Then you use that applet in your JavaScript.