Update current combo dropdown ....

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • David

    #1

    Update current combo dropdown ....

    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='vbscr ipt'>
    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.Da te.Options
    For Count = 1 To 20
    StrDate = "Tuesday " & Right("0" & Day(TheDate),2) & "/" &
    Right("0" &_
    Month(TheDate), 2) & "/" & Year(TheDate)
    Options.Add Window.Option(S trDate,"for " & StrDate)
    TheDate = TheDate + 7
    Next
    End Sub
    </script>

    _______________ _______________ _______________ ______

    Appreciate your help


    David
  • kaeli

    #2
    Re: Update current combo dropdown ....

    In article <c178e3e8.04072 10215.569a89@po sting.google.co m>, david@scene-
    double.co.uk enlightened us with...[color=blue]
    >
    > <SCRIPT language='vbscr ipt'>[/color]

    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!



    Comment

    Working...