Microsoft KB Archive/299691

= How to add a script to the ActiveX Calendar Control in FrontPage 2002 =

Article ID: 299691

Article Last Modified on 8/8/2007

-

APPLIES TO


 * Microsoft FrontPage 2002 Standard Edition

-



This article was previously published under Q299691





For a Microsoft FrontPage 97 version of this article, see 164620.

For a Microsoft FrontPage 2000 version of this article, see 205686.



SUMMARY
The ActiveX Calendar Control provides a way of displaying calendar-related events on a Web page. ActiveX Controls can be combined to add greater functionality to your Web pages than is possible with a single control. This article explains how to add a script to an ActiveX Calendar Control.

NOTE: Microsoft Office XP installs the ActiveX Calendar Control. If you do not have Microsoft Office XP installed, the Calendar Control may not appear in the Choose a control list. The Calendar Control can be found in the Microsoft Office XP Installation Options under the following path:   Microsoft Office Microsoft Access for Windows Calendar Control NOTE: This article makes use of custom DHTML and ActiveX Controls that may not be available in all browsers. For more information about compatibility with other browsers, click Microsoft FrontPage Help on the Help menu, type compatibility in the Office Assistant or the Answer Wizard, and then click Search to view the topic.



MORE INFORMATION
Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements. NOTE: You may receive an error message if you copy the examples directly from this article and paste them into FrontPage. The angle brackets may appear as escaped HTML code. To work around this behavior, paste the script into a blank Notepad document, and then copy it from Notepad before you paste it into FrontPage.

Code Sample
In a new page in FrontPage, follow these steps to use the Calendar Control to populate a text box in an HTML form:  Insert a form on the page.

To insert a form on your new page, follow these steps:  On the Insert menu, point to Form and then click Textbox. Double-click the text box. In the Text Box Properties dialog box, change the Name box to txtDate . Click OK to close the Text Box Properties dialog box. Right-click the form, and then select Form Properties.</li> Type MyForm in the Form name field.</li> Click OK to close the Form Properties dialog box.</li></ol> </li> Insert the Calendar Control on the page.

To insert the Calendar control on your page, follow these steps: <ol style="list-style-type: lower-alpha;"> On the Insert menu, click Web Component.</li> In the Insert Web Component dialog box, click Advanced Controls in the Component type list, and then click ActiveX Control. Click Next.</li> In the Choose a control list, click Calendar Control 10.0, and then click Finish.</li></ol> </li> Add a script to the Calendar Control.

To add a script to the Calendar Control, follow these steps: <ol style="list-style-type: lower-alpha;"> Click the HTML tab.</li>  Insert the following code under the <BODY> tag: <SCRIPT LANGUAGE=&quot;vbscript&quot;>

</SCRIPT> </li></ol> </li></ol>

When you preview your Web page, as you click dates in the calendar, the text box will be populated with the date selected.

Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements.

<div class="references_section">