Create Pulldown Menus for Month/Day/Year in HTA

H

Highlander

Hello all. Consider the following HTA:

<html>
<head>
<title>Date Pulldowns</title>
<HTA:APPLICATION
ID="HTAUI"
APPLICATIONNAME="Date Pulldowns"
SCROLL="no"
SINGLEINSTANCE="yes"
WINDOWSTATE="maximized">
</head>

<SCRIPT language="VBScript">
Dim fromMonth, fromDay, fromYear, toMonth, toDay
Dim toYear, fromDate, toDate
Sub Window_Onload
self.Focus()
self.ResizeTo 400,200
self.MoveTo 400,150
End Sub

Sub FromMonthSelectSub
fromMonth = FromMonthSelection.Value
End Sub

Sub FromDaySelectSub
fromDay = FromDaySelection.Value
End Sub

Sub FromYearSelectSub
fromYear = FromYearSelection.Value
End Sub

Sub ToMonthSelectSub
toMonth = ToMonthSelection.Value
End Sub

Sub ToDaySelectSub
toDay = ToDaySelection.Value
End Sub

Sub ToYearSelectSub
toYear = ToYearSelection.Value
End Sub

Sub DisplayDatesSub
fromDate = fromMonth & "/" & fromDay & "/" & fromYear
toDate = toMonth & "/" & toDay & "/" & toYear
MsgBox "From:" & vbTab & fromDate & vbCrlf & "To:" & vbTab & toDate
End Sub
</SCRIPT>

<BODY STYLE="font:6 pt arial; color:white;
filter:progid:DXImageTransform.Microsoft.Gradient
(GradientType=1, StartColorStr='#000000', EndColorStr='#0000FF')">
<p align="left"><font face="serif" size="4"><b>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
From:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;
To:
<br>
<align="left">
<select id="FromMonthSelection" onChange="FromMonthSelectSub">
<option value="0"></option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
</select>

<select id="FromDaySelection" onChange="FromDaySelectSub">
<option value="0"></option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
</select>

<select id="FromYearSelection" onChange="FromYearSelectSub">
<option value="0"></option>
<option value="2007">2007</option>
<option value="2006">2006</option>
<option value="2005">2005</option>
<option value="2004">2004</option>
<option value="2003">2003</option>
<option value="2002">2002</option>
</select>
&nbsp;&nbsp;

<align="left">
<select id="ToMonthSelection" onChange="ToMonthSelectSub">
<option value="0"></option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
</select>

<select id="ToDaySelection" onChange="ToDaySelectSub">
<option value="0"></option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
</select>

<select id="ToYearSelection" onChange="ToYearSelectSub">
<option value="0"></option>
<option value="2007">2007</option>
<option value="2006">2006</option>
<option value="2005">2005</option>
<option value="2004">2004</option>
<option value="2003">2003</option>
<option value="2002">2002</option>
</select>

<p align="left">
<input id=DisplayDatesButton type="button" value="Display Dates"
name="DisplayDates_button"
onClick="DisplayDatesSub">
<p>
</BODY>
</html>

The script works fine, but I'm wondering if there's any way to
dynamically populate the pulldown lists with all the months of the
year, days of the month, etc. - rather than have to list each one out
like this:

<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
etc.
etc.
etc.

Any suggestions would be greatly appreciated.
Thanks!

- Dave
 
A

Andy Dingley

Highlander said:
Consider the following HTA:

I'd rather not. You posted it to c.i.w.a.h where it's off-topic
because:

It's a HTA (spawn of pure evil) rather than HTML
It's a HTML, thus not suitable for "web" use, as opposed to M$'s little
play-nice-with-everyone sandpit.
It uses VBScript so it's IE-restricted
The HTML is a bit poor
The CSS is a bit poor

The script works fine, but I'm wondering if there's any way to
dynamically populate the pulldown lists with all the months of the
year, days of the month, etc. - rather than have to list each one out
like this:

HTML isn't a programming language, it's fundamentally a static text
markup language. So stick static things into it statically.

If you want to generate this programmatically (probably overkill for
days and months, but the principle isn't bad) then do it with some
server-side program that's _external_ to the HTML document itself (and
it's only a line or two of ASP, even ASP/VBScript).

Embedding executables into static documents is only sensible if you're
deliberately trying to obfuscate things, or you're drawing Hilbert
curves.
 
M

McKirahan

Highlander said:
Hello all. Consider the following HTA:
[snip]


The script works fine, but I'm wondering if there's any way to
dynamically populate the pulldown lists with all the months of the
year, days of the month, etc. - rather than have to list each one out
like this:

<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
etc.
etc.
etc.

Any suggestions would be greatly appreciated.


Will this help? This cuts the code size in half.

<html>
<head>
<title>Date Pulldowns</title>
<HTA:APPLICATION
ID="HTAUI"
APPLICATIONNAME="Date Pulldowns"
SCROLL="no"
SINGLEINSTANCE="yes"
WINDOWSTATE="maximized">
<script type="text/vbscript">
Option Explicit
'*
Const cOPT = "<option value='?'>?</option>"
'*
Dim fromMDY(2)
Dim toMDY(2)
Dim optMDY(2)
optMDY(0) = "<option value='0'></option>"
optMDY(1) = "<option value='0'></option>"
optMDY(2) = "<option value='0'></option>"
Dim i
'*
For i = 1 To 12
optMDY(0) = optMDY(0) & vbCrLf & Replace(cOPT,"?",i)
Next
For i = 1 To 31
optMDY(1) = optMDY(1) & vbCrLf & Replace(cOPT,"?",i)
Next
For i = Year(Date)+1 To Year(Date)-4 Step -1
optMDY(2) = optMDY(2) & vbCrLf & Replace(cOPT,"?",i)
Next

Sub Selected(What)
Select Case What
Case "FromMonth"
fromMDY(0) = FromMonth.Value
Case "FromDay"
fromMDY(1) = FromDay.Value
Case "FromYear"
fromMDY(2) = FromYear.Value
Case "ToMonth"
toMDY(0) = ToMonth.Value
Case "ToDay"
toMDY(1) = ToDay.Value
Case "ToYear"
toMDY(2) = ToYear.Value
End Select
End Sub

Sub DisplayDates()
MsgBox "From:" & vbTab & Join(fromMDY,"/") & vbCrlf _
& "To:" & vbTab & Join(toMDY,"/")
End Sub

Sub Window_Onload()
self.Focus()
self.ResizeTo 400,200
self.MoveTo 400,150
End Sub
</script>
</head>
<body style="font:6 pt arial; color:white;
filter:progid:DXImageTransform.Microsoft.Gradient
(GradientType=1, StartColorStr='#000000', EndColorStr='#0000FF')">
<font face="serif" size="4">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<b>From:</b>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;
<b>To:</b>
<br>
<select id="FromMonth" onChange="Selected('FromMonth')">
<script type="text/vbscript">
document.write(optMDY(0))
</script>
</select>

<select id="FromDay" onChange="Selected('FromDay')">
<script type="text/vbscript">
document.write(optMDY(1))
</script>
</select>

<select id="FromYear" onChange="Selected('FromYear')">
<script type="text/vbscript">
document.write(optMDY(2))
</script>
</select>

&nbsp;&nbsp;

<select id="ToMonth" onChange="Selected('ToMonth')">
<script type="text/vbscript">
document.write(optMDY(0))
</script>
</select>

<select id="ToDay" onChange="Selected('ToDay')">
<script type="text/vbscript">
document.write(optMDY(1))
</script>
</select>

<select id="ToYear" onChange="Selected('ToYear')">
<script type="text/vbscript">
document.write(optMDY(2))
</script>
</select>

<br><br>
<input type="button" value="Display Dates" onClick="DisplayDates()">
</body>
</html>


There's no such tag as <align="left">
(it's the default alignment anyway)
and you use of &nbsp;
for spacing is not recommended;
consider using a <table>.

Also, you may want to use 2-digit months and days.
 
M

McKirahan

Andy Dingley said:
I'd rather not. You posted it to c.i.w.a.h where it's off-topic
because:

It's a HTA (spawn of pure evil) rather than HTML
Huh?

It's a HTML, thus not suitable for "web" use, as opposed to M$'s little
play-nice-with-everyone sandpit.

HTA's are (primarily) meant to run locally.
It uses VBScript so it's IE-restricted

So, this is a VBScript newsgroup.
The HTML is a bit poor
Agreed.

The CSS is a bit poor
Agreed.

HTML isn't a programming language, it's fundamentally a static text
markup language. So stick static things into it statically.

VBScript is the programming language.
If you want to generate this programmatically (probably overkill for
days and months, but the principle isn't bad) then do it with some
server-side program that's _external_ to the HTML document itself (and
it's only a line or two of ASP, even ASP/VBScript).

HTA's are not an ASP topic.
Embedding executables into static documents is only sensible if you're
deliberately trying to obfuscate things, or you're drawing Hilbert
curves.

Huh? What does this have to do with anything?
 
S

Sherm Pendley

McKirahan said:
So, this is a VBScript newsgroup.

What part of comp.infosystems.www.authoring.HTML, or alt.HTML do you not
understand?

You cross-posted this to three groups; one of them is relevant, the others
are not. Followups set.
VBScript is the programming language.

You posted to two different HTML groups also.

sherm--
 
H

Highlander

McKirahan,

Thanks for your suggestions!

Andy said:
I'd rather not. You posted it to c.i.w.a.h where it's off-topic

Sherm said:
You cross-posted this to three groups; one of them is relevant, the others
are not. Followups set.

....

Off-topic? Not relevant?

A search in comp.infosystems.www.authoring.html for the word "HTA":
39 results

A search in alt.html for the word "HTA":
70 results

Furthermore, a "date picker" pulldown menu of Month/Day/Year selections
is a *very* common element on websites; so it stands to reason that
HTML related newsgroups (such as these two that I posted to) just might
have info on this type of dropdown.
 
A

Ayush

Replied to [Highlander]s message :
Hello all. Consider the following HTA:

<html>
<head>
<title>Date Pulldowns</title>
<HTA:APPLICATION
ID="HTAUI"
APPLICATIONNAME="Date Pulldowns"
SCROLL="no"
SINGLEINSTANCE="yes"
WINDOWSTATE="maximized">
</head>


I am not very good at VBs so i made this in Js. Insert this at top of your VBS script
tag :

There is a variable named elementNames.. The syntax is like :
"ID of element|LengthAndValueOptions,ID|LengthAndValue etc.etc...



<script language="JScript">
window.onload=Makee
elementNames="FromDaySelection|31,FromMonthSelection|12,ToMonthSelection|12,ToDaySelection|31"

function Makee(){
eN=elementNames.split(",");numm=new Array()
for(indX=0;indX<eN.length;indX++){
numm[indX]=parseInt(eN[indX].substring(eN[indX].length-2,eN[indX].length))
eN[indX]=document.getElementById(eN[indX].substring(0,eN[indX].length-3));
}
for(aIx=0;aIx<eN.length;aIx++){
con = document.createElement("option");
eN[aIx].options.add(con);
for(aIxx=1;aIxx<(numm[aIx]+1);aIxx++){
cTion = document.createElement("option");
eN[aIx].options.add(cTion);
cTion.innerText = aIxx;
cTion.value = aIxx;
}}}
</script>
 
H

Harlan Messinger

Highlander said:
McKirahan,

Thanks for your suggestions!





...

Off-topic? Not relevant?

A search in comp.infosystems.www.authoring.html for the word "HTA":
39 results

A topic of discussion doesn't become on-topic in a newsgroup because
people may mention it in passing while discussing something that is on
topic, or because other people have already raised it in off-topic postings.

HTA is for running apps on local computers. C.i.w.a.h is about authoring
HTML for the Web. They're mutually exclusive.
A search in alt.html for the word "HTA":
70 results

Alt.html is about anything HTML related, so I don't see any problem with
bringing up the topic there. OMMV (others' mileage may vary).
Furthermore, a "date picker" pulldown menu of Month/Day/Year selections
is a *very* common element on websites;

but not as an HTA.
so it stands to reason that
HTML related newsgroups (such as these two that I posted to) just might
have info on this type of dropdown.

People in a wine newsgroup might know something about cheese, but ask a
cheese-related question in a cheese newsgroup and leave the wine
newsgroup for people to discuss wine. Otherwise the point of having
separate newsgroups for so many topics is kind of defeated.

It's one thing if there isn't *any* obvious newsgroup to post a question
in, or if a newsgroup specific to the subject exists but has no traffic
other than spammers. But this isn't one of those situations. Frankly, I
would think that one of the microsoft.* newsgroups related to
"inetexplorer" would be the best bet.
 
A

Ayush

Replied to [Harlan Messinger] :

Can you tell me which server are you using to subscribe to this NG ?



→ Ayush
 
D

Dr J R Stockton

In microsoft.public.scripting.vbscript message <1167406316.195202.84900@
k21g2000cwa.googlegroups.com>, Fri, 29 Dec 2006 07:31:56, Highlander
The script works fine, but I'm wondering if there's any way to
dynamically populate the pulldown lists with all the months of the
year, days of the month, etc. - rather than have to list each one out
Any suggestions would be greatly appreciated.

Well, you could read the FAQ on the subject of dates.

Your job is done using javascript in my js-date6.htm#YMD, including only
offering the right number of days for the selected month. There is also
code for year-week-day numbering, using standard weeks.

But you should consider whether all likely users will have scripting
enabled.

FU set.
 
M

mayayana

It's not clear whether you've got your
answer yet, in all this confusion. :)

So just in case....
In addition to McKirihan's method of
looping through pre-existing options, you
can also load them and clear them dynamically.

It's awkward because it's non-intuitive.
The DOM treats an option as an object, so you have
to "create" them and add them to a SELECT::

Dim Opt

Set Opt = document.createElement("OPTION")
Opt.text = '-- text of option here.
Opt.value = '-- hidden value here.
FromMonthSelection.add Opt
Set Opt = Nothing

To clear options just use:

FromMonthSelection.length = 0
 
D

Dan

Highlander said:
Furthermore, a "date picker" pulldown menu of Month/Day/Year selections
is a *very* common element on websites; so it stands to reason that
HTML related newsgroups (such as these two that I posted to) just might
have info on this type of dropdown.

And it's perfectly possible to create one in standard HTML, without any
need for all of that HTA / VBScript fecal matter.
 
R

RobG

Highlander said:
Hello all. Consider the following HTA: [...]
The script works fine, but I'm wondering if there's any way to
dynamically populate the pulldown lists with all the months of the
year, days of the month, etc. - rather than have to list each one out
like this:

Given that:

1. You can't control the order of selection so using script to modify
date selects rapidly becomes overly complex.
2. Users without scripting available or enabled (or an incompatible
browser) can't enter a date at all
3. Many users find "date selects" annoying

why not just let the user enter a normal date in a text input?
 
H

Highlander

mr_unreliable said:
hi Highlander,

I'm impressed with all that html to get the date,
but why not let microsoft do the work?

Microsoft has a "date-picker" control which has
good-looking graphics, and is familiar to anybody
who uses windows.

If you have a recent version of vb (or maybe even
vba) you will have "date-picker" available, and
it is scriptable via an actX interface.

Microsoft's (vb) date-picker is located in mscomct2.ocx.
There is a demo script attached which shows how to
use it.

There is more. Microsoft also published a msCalender
control (mscal.ocx). There is also a demo script
(hta) attached, in case you happen to have the mscal
control on your system. (I personally like the DTP
better).

Returning to the date-picker control, if you _don't_
happen to have microsoft's control installed, there
are several other versions published. I happen to
like the ccrp's (Common Control Replacement Project)
-- a group of guys (sorry, no gals) who are so arrogant
that they think they can do a better job with the controls
than microsoft, and generally succeeded.

Here is a reference to the ccrp "date-picker" control,
which they call the "Date/Time-Picker":

http://ccrp.mvps.org/index.html?controls/ccrpdtp6.htm

It is also an actX control and you ought to be able
to instantiate it on an hta page and also script it,
even though I don't have a demo of that.

cheers, jw
____________________________________________________________

You got questions? WE GOT ANSWERS!!! ..(but,
no guarantee the answers will be applicable to the questions)


p.s. I have also seen html/dhtml versions of the
date-picker control, but why bother?


--------------040709090300030903000607
Content-Type: text/plain
Content-Disposition: inline;
filename="demoMSDTPickerControl.hta.txt"
X-Google-AttachSize: 1702

<HTML>
<HEAD>

<HTA:APPLICATION ID="oHTA" APPLICATIONNAME="Show_msCAL"
WINDOWSTATE="normal" SCROLL = "no" BORDERSTYLE="normal" BORDER="thin"
CAPTION="yes" MAXIMIZEBUTTON="no" MINIMIZEBUTTON="no" ICON="mru.ico"
SHOWINTASKBAR="yes" SINGLEINSTANCE="yes" SYSMENU="yes" VERSION="1.0" >

<TITLE> demo msDateTimePicker control </TITLE>
<!--
' --- description block --------------------------
'
' Title: an HTA to demo ms Date-Picker control...
'
' Description: allows the user to pick a date...
'
' Author: mr_unreliable
' Website: none at present,
' (but may be found lurking around wsh/vbs ng)...
'
' Usage: Use at you own risk, tested on win98se...
'
' --- revision history ---------------------------
' 29Dec06: initial attempt...
' --- end of description block -------------------
-->

<SCRIPT language="vbscript">
' (global code: resize the window)...
window.ResizeTo 350,300

Sub btnReadDate_onClick()
' MsgBox("click event detected")
MsgBox("The msCAL control reads: " & vbCrLf & vbCrLf _
& CStr(oDTP.Month) & "/" & CStr(oDTP.Day) & "/" _
& CStr(oDTP.Year))
End Sub
</SCRIPT>
</HEAD>

<BODY bgcolor="silver" style="font:10pt verdana">
&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;
<OBJECT ID="oDTP" WIDTH=250 HEIGHT=25
CLASSID="CLSID:20DD1B9E-87C4-11D1-8BE3-0000F8754DA1">
<PARAM NAME="CalendarTitleBackColor" VALUE="-2147483646">
<PARAM NAME="CalendarTitleForeColor" VALUE="-2147483639">
</OBJECT>
<BR><BR><BR>
<p>Note: to show the date-time-picker graphic,
you must click on the down arrow to the right of
the textbox above. </p>

<BR><BR><BR><BR><BR>
<BUTTON id="btnReadDate"> Read the Date from msDTP Control </BUTTON>
</BODY>
</HTML>

--------------040709090300030903000607
Content-Type: text/plain
Content-Disposition: inline;
filename="demoMSCALControl.hta.txt"
X-Google-AttachSize: 1378

<HTML>
<HEAD>

<HTA:APPLICATION ID="oHTA" APPLICATIONNAME="Show_msCAL"
WINDOWSTATE="normal" SCROLL = "no" BORDERSTYLE="normal" BORDER="thin"
CAPTION="yes" MAXIMIZEBUTTON="no" MINIMIZEBUTTON="no" ICON="mru.ico"
SHOWINTASKBAR="yes" SINGLEINSTANCE="yes" SYSMENU="yes" VERSION="1.0" >

<TITLE> demo msCAL control </TITLE>
<!--
' --- description block --------------------------
'
' Title: an HTA to demo msCAL control...
'
' Description: allows the user to pick a date...
'
' Author: mr_unreliable
' Website: none at present,
' (but may be found lurking around wsh/vbs ng)...
'
' Usage: Use at you own risk, tested on win98se...
'
' --- revision history ---------------------------
' 29Dec06: initial attempt...
' --- end of description block -------------------
-->

<SCRIPT language="vbscript">
' (global code: resize the window)...
window.ResizeTo 350,300

Sub btnReadDate_onClick()
' MsgBox("click event detected")
MsgBox("The msCAL control reads: " & vbCrLf & vbCrLf _
& CStr(oMSCAL.Month) & "/" & CStr(oMSCAL.Day) & "/" _
& CStr(oMSCAL.Year))
End Sub
</SCRIPT>
</HEAD>

<BODY bgcolor="silver" style="font:10pt verdana">

<OBJECT ID="oMSCAL" WIDTH=288 HEIGHT=192
CLASSID="CLSID:8E27C92B-1264-101C-8A2F-040224009C02">
</OBJECT>

<BR><BR><BR>
<BUTTON id="btnReadDate"> Read the Date from msCAL Control </BUTTON>
</BODY>
</HTML>

--------------040709090300030903000607--

JW,

This is exactly what I was looking for! Selecting dates is now much
more efficient, there's built-in date validation, and you've cut my
script down from 181 lines to 56:

<html>
<head>
<title>Date Pulldowns</title>
<HTA:APPLICATION
ID="HTAUI"
APPLICATIONNAME="Date Pulldowns"
SCROLL="no"
SINGLEINSTANCE="yes"
WINDOWSTATE="maximized">
</head>
<SCRIPT language="VBScript">
Dim fromDate, toDate
Sub Window_Onload
self.Focus()
self.ResizeTo 400,200
self.MoveTo 400,150
End Sub
Sub DisplayDatesSub
fromDate = CStr(FromDTP.Month) & "/" & CStr(FromDTP.Day) & "/" & _
CStr(FromDTP.Year)
toDate = CStr(ToDTP.Month) & "/" & CStr(ToDTP.Day) & "/" & _
CStr(ToDTP.Year)
MsgBox "From:" & vbTab & fromDate & vbCrlf & "To:" & vbTab & toDate
End Sub
</SCRIPT>

<BODY STYLE="font:6 pt arial; color:white;
filter:progid:DXImageTransform.Microsoft.Gradient
(GradientType=1, StartColorStr='#000000', EndColorStr='#0000FF')">
<font face="serif" size="4"><b>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
FROM:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;
TO:
<br>
<OBJECT ID="FromDTP" WIDTH=125 HEIGHT=25
CLASSID="CLSID:20DD1B9E-87C4-11D1-8BE3-0000F8754DA1">
<PARAM NAME="CalendarTitleBackColor" VALUE="-2147483646">
<PARAM NAME="CalendarTitleForeColor" VALUE="-2147483639">
</OBJECT>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<OBJECT ID="ToDTP" WIDTH=125 HEIGHT=25
CLASSID="CLSID:20DD1B9E-87C4-11D1-8BE3-0000F8754DA1">
<PARAM NAME="CalendarTitleBackColor" VALUE="-2147483646">
<PARAM NAME="CalendarTitleForeColor" VALUE="-2147483639">
</OBJECT>
<p>
<input id=DisplayDatesButton type="button" value="Display Dates"
name="DisplayDates_button"
onClick="DisplayDatesSub">
<p>
</BODY>
</html>

One question jw. When the script opens the date fields display the
current date. After I've made some selections of different dates, is
there any way to programatically (VBScript) reset the date display to
the current date? Thanks.

And thanks to everyone else who had offered their suggestions.

- Dave
 

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

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top