[thelist] ASP Problem - Pulling schedules items in a loop?

Matt Warden mwarden at gmail.com
Mon Jun 4 14:31:46 CDT 2007


On 6/4/07, Jon Hughes <hughesj at firemtn.com> wrote:
> Ken,
>
> Basically, right now, it pulls one item: Whichever is in the date match.
>
> What I want to do, is output ALL items in the schedule.asp file, so I
> can return things in all dates.
>
> Schedule.asp:
> startdate=DateValue("5/29/2007")
> enddate=DateValue("6/10/2007")
> if (date() >= StartDate and date() <= EndDate) or showall = "1" then
> imgLink = "this.asp"
> imgSrc = "this.jpg"
> end if
>
> startdate=DateValue("6/11/2007")
> enddate=DateValue("6/21/2007")
> if (date() >= StartDate and date() <= EndDate) or showall = "1" then
> imgLink = "that.asp"
> imgSrc = "that.jpg"
> end if

It's hard to answer because this is only part of the code. However,
one way (NOT the best way) would be to simply write out the values at
that point rather than stuffing them into variables.

For example:

startdate=DateValue("5/29/2007")
enddate=DateValue("6/10/2007")
if (date() >= StartDate and date() <= EndDate) or showall = "1" then
   response.write "<a href="""this.asp"""><img src="""this.jpg"""></a>"
end if


-- 
Matt Warden
Cleveland, OH, USA
http://mattwarden.com


This email proudly and graciously contributes to entropy.



More information about the thelist mailing list