Print Page | Close Window

Calendar and VBScript

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Calendar
Forum Description: Topics Related to Codejock Calendar
URL: http://forum.codejock.com/forum_posts.asp?TID=3902
Printed Date: 21 November 2024 at 9:33pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Calendar and VBScript
Posted By: DaveBonas
Subject: Calendar and VBScript
Date Posted: 29 March 2006 at 1:57am

Hi All,

I am trying to get the calendar control working on a web page and have managed to get the basic object up and running with no problems using VB Script, but am now struggling to get things such as disabling edit events and detecting when user has clicked on an entry in the calendar and returning the data such as start time of the entry.

Does anyone have a example of the calendar running using vb script which covers these kind of things that they could post, sorry for the generalisation of the question but am a noob to Vb/Script and am learing as I go.

Cheers,

Dave.

 

 

 




Replies:
Posted By: sserge
Date Posted: 29 March 2006 at 7:48am
Hi Dave,

With VB Script it works in a little bit another way. There are 2 following solutions:

1. Old one (for versions 9.81 and earlier):
-----------------------------------
Sub ccJobs_IsEditOperationDisabled(byval OpParams , CancelOperation)
 OpParams.DisableCancelOperation = True // NOTE: DisableCancelOperation is hidden member.
End Sub 
 
2. new one - version 10.x
-----------------------------------
Sub ccJobs_IsEditOperationDisabledV(byval OpParams , CancelOperation)
 CancelOperation = True
End Sub
 
-----------------------------------
Both of them do the same job - just have different styles. 

--
WBR,
Serge


Posted By: DaveBonas
Date Posted: 29 March 2006 at 7:55am

Thanks Serge,

I have managed to disable the edit operation but am still struggling to replicate the HitTest process from the VB example in order to check what the user clicked on, any ideas on this one.

Dave.



Posted By: sserge
Date Posted: 29 March 2006 at 10:50am
This works in my test:
 
Sub ccJobs_DblClick()
    Dim HitTest
    Set HitTest = Document.forms(0).ccJobs.ActiveView.HitTest
   
    'xtpCalendarHitTestEvent_Mask = 4080
    If Not HitTest.HitCode and 4080 Then
        MsgBox "Event start = " & HitTest.ViewEvent.Event.StartTime
    End If
End Sub
 




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net