Update current combo dropdown ....

D

David

Hi,

I have a dropdown box on a form in an ASP page which links to the
following script. It display the next 20 Tuesdays dates + Tuesday (in
words).

I would like to have it list Every next Tuesday and Thursday. How is
this possible ?

__________________________________________________

<SCRIPT language='vbscript'>
Sub Window_Onload
Dim TheDate
Dim Count
Dim Options
TheDate = Date + vbTuesday - WeekDay(Date)
If TheDate < Date Then TheDate = TheDate + 7
Set Options = Document.All.Date.Options
For Count = 1 To 20
StrDate = "Tuesday " & Right("0" & Day(TheDate),2) & "/" &
Right("0" &_
Month(TheDate),2) & "/" & Year(TheDate)
Options.Add Window.Option(StrDate,"for " & StrDate)
TheDate = TheDate + 7
Next
End Sub
</script>

___________________________________________________

Appreciate your help


David
 
K

kaeli

david@scene- said:
<SCRIPT language='vbscript'>

vbscript != javascript

Better answers would be found in an appropriate newsgroup, such as the
many microsoft groups.
Microsoft has its own newsserver free for public use if you use a
newsreader. The name of the server, last I checked, was "msnews".
If you have trouble getting it, Google has them too.

(as to how to do it, I'd probably take the easy way and just keep the
loop you have and compare the days to vbTuesday and vbThursday and only
write them as options if they match. this is horribly inefficient for a
time frame over a couple weeks or so.)

HTH
--
--
~kaeli~
If that phone was up your a$$, maybe you could drive a
little better!
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace
 

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

Similar Threads


Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top