Group:  Microsoft Access ยป microsoft.public.access.activexcontrol
Thread: MonthView control: How to get immediate response?

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

MonthView control: How to get immediate response?
"David Mayerovitch" <davmay[ at ]sympatico.ca> 30.01.2006 19:43:30
I have inserted the Microsoft ActiveX MonthView Control, version 6.0, on an
HTA page as the <OBJECT> MonthView1.

I want the user to select a date from the calendar, with the selected date
being displayed immediately as a string which represents the MonthView
object's "value" property. In my example I am displaying the string in the
document title.

But I haven't been able to trigger this immediate response. As you can see
from the following demo, I can make the date string appear in response to
the MonthView object's "ondeactivate" event, when the user selects a date
and then clicks outside the object.

I can also make the string appear in response to the click of a button
external to the object.

I have tried using the events "onclick" and "onpropertychange" instead of
"ondeactivate", but the MonthView object does not seem to recognize these.

You can save the <html> below as "MonthView.hta" and run it.

Any suggestions? (I was wondering if VBScript, of which I have little
knowledge, might do the job where Javascript fails.)

Thanks.

David

-------------------- DEMO------------------
<html>
<title>MonthView test</title>
<head>
<script href="" type="text/javascript">
function test(){
document.title="Button click: " + MonthView1.value;
} // test()
</script>

</head>

<body onload="testbut.focus()">

<p>Use the calendar to select a date. Then click anywhere outside the
calendar. The selected date will appear in the title bar in response to the
"ondeactivate" event.</p>
<p>You can also select a date and then click on the 'Show selected date
value' button to get a similar result.</p>
<p><i>But how can I get the selected date to display every time the user
clicks on the calendar?</i></p>

<OBJECT ID="MonthView1" WIDTH=180 HEIGHT=159
CLASSID="CLSID:232E456A-87C3-11D1-8BE3-0000F8754DA1"
ondeactivate="document.title='ondeactivate: ' + this.value">
<PARAM NAME="_ExtentX" VALUE="4763">
<PARAM NAME="_ExtentY" VALUE="4180">
<PARAM NAME="_Version" VALUE="393216">
<PARAM NAME="Appearance" VALUE="1">
<PARAM NAME="ShowToday" VALUE="0">
<PARAM NAME="StartOfWeek" VALUE="662831105">
</OBJECT>
<br/><br/>
<button id="testbut" type="button" onclick="test()">Show selected date
value</button>
</body>
</html>


Re: MonthView control: How to get immediate response?
"Douglas J. Steele" <NOSPAM_djsteele[ at ]NOSPAM_canada.com> 30.01.2006 22:29:05
I'd suggest asking this in the appropriate scripting group
(microsoft.public.scripting.jscript or microsoft.public.scripting.vbscript).

This newsgroup is for questions about using ActiveX controls with Access,
the database product that's part of Office Professional.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"David Mayerovitch" <davmay[ at ]sympatico.ca> wrote in message
news:O8Tc4VdJGHA.1124[ at ]TK2MSFTNGP10.phx.gbl...
[Quoted Text]
>I have inserted the Microsoft ActiveX MonthView Control, version 6.0, on an
>HTA page as the <OBJECT> MonthView1.
>
> I want the user to select a date from the calendar, with the selected date
> being displayed immediately as a string which represents the MonthView
> object's "value" property. In my example I am displaying the string in the
> document title.
>
> But I haven't been able to trigger this immediate response. As you can see
> from the following demo, I can make the date string appear in response to
> the MonthView object's "ondeactivate" event, when the user selects a date
> and then clicks outside the object.
>
> I can also make the string appear in response to the click of a button
> external to the object.
>
> I have tried using the events "onclick" and "onpropertychange" instead of
> "ondeactivate", but the MonthView object does not seem to recognize these.
>
> You can save the <html> below as "MonthView.hta" and run it.
>
> Any suggestions? (I was wondering if VBScript, of which I have little
> knowledge, might do the job where Javascript fails.)
>
> Thanks.
>
> David
>
> -------------------- DEMO------------------
> <html>
> <title>MonthView test</title>
> <head>
> <script href="" type="text/javascript">
> function test(){
> document.title="Button click: " + MonthView1.value;
> } // test()
> </script>
>
> </head>
>
> <body onload="testbut.focus()">
>
> <p>Use the calendar to select a date. Then click anywhere outside the
> calendar. The selected date will appear in the title bar in response to
> the "ondeactivate" event.</p>
> <p>You can also select a date and then click on the 'Show selected date
> value' button to get a similar result.</p>
> <p><i>But how can I get the selected date to display every time the user
> clicks on the calendar?</i></p>
>
> <OBJECT ID="MonthView1" WIDTH=180 HEIGHT=159
> CLASSID="CLSID:232E456A-87C3-11D1-8BE3-0000F8754DA1"
> ondeactivate="document.title='ondeactivate: ' + this.value">
> <PARAM NAME="_ExtentX" VALUE="4763">
> <PARAM NAME="_ExtentY" VALUE="4180">
> <PARAM NAME="_Version" VALUE="393216">
> <PARAM NAME="Appearance" VALUE="1">
> <PARAM NAME="ShowToday" VALUE="0">
> <PARAM NAME="StartOfWeek" VALUE="662831105">
> </OBJECT>
> <br/><br/>
> <button id="testbut" type="button" onclick="test()">Show selected date
> value</button>
> </body>
> </html>
>
>


Re: MonthView control: How to get immediate response?
"David Mayerovitch" <davmay[ at ]sympatico.ca> 31.01.2006 00:06:30
My mistake. Sorry.

"Douglas J. Steele" <NOSPAM_djsteele[ at ]NOSPAM_canada.com> wrote in message
news:uOwQUyeJGHA.2708[ at ]tk2msftngp13.phx.gbl...
[Quoted Text]
> I'd suggest asking this in the appropriate scripting group
> (microsoft.public.scripting.jscript or
> microsoft.public.scripting.vbscript).
>
> This newsgroup is for questions about using ActiveX controls with Access,
> the database product that's part of Office Professional.
>
> --
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no private e-mails, please)
>
>
> "David Mayerovitch" <davmay[ at ]sympatico.ca> wrote in message
> news:O8Tc4VdJGHA.1124[ at ]TK2MSFTNGP10.phx.gbl...
>>I have inserted the Microsoft ActiveX MonthView Control, version 6.0, on
>>an HTA page as the <OBJECT> MonthView1.
>>
>> I want the user to select a date from the calendar, with the selected
>> date being displayed immediately as a string which represents the
>> MonthView object's "value" property. In my example I am displaying the
>> string in the document title.
>>
>> But I haven't been able to trigger this immediate response. As you can
>> see from the following demo, I can make the date string appear in
>> response to the MonthView object's "ondeactivate" event, when the user
>> selects a date and then clicks outside the object.
>>
>> I can also make the string appear in response to the click of a button
>> external to the object.
>>
>> I have tried using the events "onclick" and "onpropertychange" instead of
>> "ondeactivate", but the MonthView object does not seem to recognize
>> these.
>>
>> You can save the <html> below as "MonthView.hta" and run it.
>>
>> Any suggestions? (I was wondering if VBScript, of which I have little
>> knowledge, might do the job where Javascript fails.)
>>
>> Thanks.
>>
>> David
>>
>> -------------------- DEMO------------------
>> <html>
>> <title>MonthView test</title>
>> <head>
>> <script href="" type="text/javascript">
>> function test(){
>> document.title="Button click: " + MonthView1.value;
>> } // test()
>> </script>
>>
>> </head>
>>
>> <body onload="testbut.focus()">
>>
>> <p>Use the calendar to select a date. Then click anywhere outside the
>> calendar. The selected date will appear in the title bar in response to
>> the "ondeactivate" event.</p>
>> <p>You can also select a date and then click on the 'Show selected date
>> value' button to get a similar result.</p>
>> <p><i>But how can I get the selected date to display every time the user
>> clicks on the calendar?</i></p>
>>
>> <OBJECT ID="MonthView1" WIDTH=180 HEIGHT=159
>> CLASSID="CLSID:232E456A-87C3-11D1-8BE3-0000F8754DA1"
>> ondeactivate="document.title='ondeactivate: ' + this.value">
>> <PARAM NAME="_ExtentX" VALUE="4763">
>> <PARAM NAME="_ExtentY" VALUE="4180">
>> <PARAM NAME="_Version" VALUE="393216">
>> <PARAM NAME="Appearance" VALUE="1">
>> <PARAM NAME="ShowToday" VALUE="0">
>> <PARAM NAME="StartOfWeek" VALUE="662831105">
>> </OBJECT>
>> <br/><br/>
>> <button id="testbut" type="button" onclick="test()">Show selected date
>> value</button>
>> </body>
>> </html>
>>
>>
>
>


Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net