Dave, Scope your variable.  either request.deadline or application.deadline

Then do your date comparisons against that date and time.



<cfif Now() GT request.AuctionEnd>
  <cfset request.AuctionStatus="Over">
<cfelse>
  <cfparam name="request.AuctionStatus" default="">
</cfif>


Then in place were needed around the site, I have (html removed):


<cfif not request.AuctionStatus IS "Over">
<cfoutput><a
href="index.cfm?action=bidhistory&#client.URLToken#&ITEMS_ID=#FindItem.ITEMS
_ID#">Bid History</a>
</cfoutput>
 Your Bid:    $<cfinput type="Text" name="NewBid" message="Please specify
your bid" required="Yes" size="8" maxlength="6" onchange="MinBid()">
&nbsp;<input type="submit" value="BID">


<cfelse>


<cfoutput><a
href="index.cfm?action=bidhistory&#client.URLToken#&ITEMS_ID=#FindItem.ITEMS
_ID#">Bid History</a></cfoutput>Bidding Is Over 

<cfoutput>
The auction ends #DATEFORMAT(request.AuctionEnd, "mmmm, d")#, at
#timeFORMAT(request.AuctionEnd, "h:MM")# p.m. EDT.</cfoutput>


H.



> -----Original Message-----
> From: Dave Lyons [SMTP:[EMAIL PROTECTED]]
> Sent: Monday, February 17, 2003 4:27 PM
> To:   CF-Talk
> Subject:      Re: i shall ask 1 more time
> 
> this is how I have it set in the application.cfm template
> 
> <cfset deadline = createDateTime(2003, 2, 16, 23, 25, 0)>
> 
> 
> 
> Dave
> 
> ----- Original Message -----
> From: "Owens, Howard" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Monday, February 17, 2003 12:40 PM
> Subject: RE: i shall ask 1 more time
> 
> 
> > Are you trying to set some sort of deadline?  You want a set time when
> > things end ... and display a countdown to that time?
> >
> > Try setting your time this way:
> >
> > timeEnd=CreateDateTime(2002, 11, 8, 15, 30, 0);
> >
> >
> > H.
> >
> >
> > > -----Original Message-----
> > > From: Dave Lyons [SMTP:[EMAIL PROTECTED]]
> > > Sent: Sunday, February 16, 2003 5:41 PM
> > > To: CF-Talk
> > > Subject: Re: i shall ask 1 more time
> > >
> > > <!--- script to count down time left in current auction --->
> > > <CFSCRIPT>
> > > timeleft = DateDiff("s", Now(), deadline);
> > > daystogo = Int(timeleft /86400);
> > > leftover1 = timeleft - (daystogo * 86400);
> > > hourstogo = Int(leftover1/3600);
> > > leftover2 = leftover1 - (hourstogo * 3600);
> > > minutestogo= Int(leftover2/60);
> > > leftover3 = leftover2 - (minutestogo * 60);
> > > secondstogo = leftover3;
> > > </CFSCRIPT>
> > >
> > >
> > > and no its not refreshing
> > > i have an example (live) if you need to see that
> > >
> > >
> > > Dave
> > >
> > > ----- Original Message -----
> > > From: "CFDEV" <[EMAIL PROTECTED]>
> > > To: "CF-Talk" <[EMAIL PROTECTED]>
> > > Sent: Sunday, February 16, 2003 8:27 PM
> > > Subject: RE: i shall ask 1 more time
> > >
> > >
> > > > First off, how are the variables being created?
> > > > Is the variables refreshed everytime the page is loaded?
> > > >
> > > >
> > > >
> > > > -----Original Message-----
> > > > From: Dave Lyons [mailto:[EMAIL PROTECTED]]
> > > > Sent: Sunday, February 16, 2003 8:07 PM
> > > > To: CF-Talk
> > > > Subject: i shall ask 1 more time
> > > >
> > > >
> > > > I still got this code that is bugging the crap outta me!
> > > >
> > > > here's the code
> > > >
> > > > <cfif daystogo LT 1 AND hourstogo IS 00 AND minutestogo IS 00 AND
> > > > secondstogo IS 00>
> > > >     <strong><img src="images/ALERT.gif" width="18" height="13"> To
> > > > Late</strong>
> > > >     <cfelse>
> > > >     <cfoutput>#NumberFormat(secondstogo,'00')#
> seconds</cfoutput></td>
> > > >     </cfif>
> > > >
> > > >
> > > > the problem is that this is a count down to a set month, day, hour,
> > > minute
> > > > and second.
> > > >
> > > > for example when the timer gets to be less that a day it dispalys a
> > > message
> > > > and only the hours, minutes & seconds continue to count down. And as
> > > each
> > > is
> > > > passed it displays a hurry up message. It all works great until the
> > > seconds
> > > > run out at which point I would like it to just show the messages but
> > > instead
> > > > it starts to count down the hours, minutes and seconds again.
> > > > how can I make the count down stop after the seconds get to 00?
> > > >
> > > > thanks
> > > >
> > > > dave
> > > > <!--- doesn't know jack about cfm --->
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > 
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to