Looking for how to on active x calendar

A

activex calendar

OK. Can you give an example and the instruction of how to
do this in Frontpage 2000?
-----Original Message-----
Hi,

There has to be script associated with the events that are fired from the control.

--
Mike -- FrontPage MVP '97-'02
http://www.websunlimited.com
Stop Spam Email Mining from your web pages with SpamStopper
m_stopper_help_dir.htm
FrontPage Add-ins Since '97 2003 / 2002 / 2000 Compatible

"activex calendar" <[email protected]>
wrote in message [email protected]...
 
J

Jim Buyens

Suppose your calendar control is named cal01.

1. Change your Submit button from type="submit" to
"type=button", and add an onclick="subForm();"
attribute:
2. Add hidden form fields named qday, qmon, and qyr
to your form. Here's some sample code:
<input type="hidden" name="qday" value="0">
<input type="hidden" name="qmon" value="0">
<input type="hidden" name="qyr" value="0">
3. Code the subForm() function like this:
<script>
function subForm() {
if (cal01.day > 0){
form1.qmon.value = cal01.month;
form1.qday.value = cal01.day;
form1.qyr.value = cal01.year;
document.form1.submit();
}else{
alert("You must select a date!");
return;
}
}
</script>

Note that the script copies the month, day, and year
fields from the Calendar control into the qmon, qday, and
qyr hidden form fields. The form handler then receives the
hidden form field values.

To see a complete page that does this, browse:

http://www.interlacken.com/fp11iso/ch32/bdaysel.htm

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------

</script>
 
A

activex calendar+-

Thanks Jim I am going to try that.
-----Original Message-----
Suppose your calendar control is named cal01.

1. Change your Submit button from type="submit" to
"type=button", and add an onclick="subForm();"
attribute:
2. Add hidden form fields named qday, qmon, and qyr
to your form. Here's some sample code:
<input type="hidden" name="qday" value="0">
<input type="hidden" name="qmon" value="0">
<input type="hidden" name="qyr" value="0">
3. Code the subForm() function like this:
<script>
function subForm() {
if (cal01.day > 0){
form1.qmon.value = cal01.month;
form1.qday.value = cal01.day;
form1.qyr.value = cal01.year;
document.form1.submit();
}else{
alert("You must select a date!");
return;
}
}
</script>

Note that the script copies the month, day, and year
fields from the Calendar control into the qmon, qday, and
qyr hidden form fields. The form handler then receives the
hidden form field values.

To see a complete page that does this, browse:

http://www.interlacken.com/fp11iso/ch32/bdaysel.htm

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------

</script>




p
.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top