- see footer for list info -<
Thanks both ..... Onto the next form .....
Regards - Paul
From: "Adrian Lynch" <[EMAIL PROTECTED]>
Reply-To: Coldfusion Development <[email protected]>
To: "Coldfusion Development" <[email protected]>
Subject: RE: [CF-Dev] This is driving me nuts .....
Date: Thu, 23 Mar 2006 13:02:51 -0000
>- see footer for list info -<
if IncidentType eq "Nothing Selected" {
ErrorMessage = ErrorMessage & "You must select at least one incident
type<br>";
}
Should be
if (IncidentType eq "Nothing Selected") {
ErrorMessage = ErrorMessage & "You must select at least one incident
type<br>";
}
Adrian
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Paul Swingewood
Sent: 23 March 2006 13:00
To: [email protected]
Subject: Re: [CF-Dev] This is driving me nuts .....
>- see footer for list info -<
Sorry no ....
I just put that there to show it was set ....
>From: "Michael Traher" <[EMAIL PROTECTED]>
>Reply-To: Coldfusion Development <[email protected]>
>To: "Coldfusion Development" <[email protected]>
>Subject: Re: [CF-Dev] This is driving me nuts .....
>Date: Thu, 23 Mar 2006 12:54:36 +0000
>
> >- see footer for list info -<
>is your <cfparam> really in the middle of your <cfswitch>?
>
>
>On 3/23/06, Paul Swingewood <[EMAIL PROTECTED]> wrote:
> >
> > >- see footer for list info -<
> > Thanks Michael.
> >
> > I have another problem now .....
> >
> > I am trying to make sure the user selects at least one checkbox .....
> > (I've
> > done this before but can't get it to work in script ....)
> >
> > <cfparam name="IncidentType" default="Nothing Selected">
> > <cfcase value="11"><!--- Check Part 2 of the form --->
> > <cfscript>
> > // IncidentType.
> > if IncidentType eq "Nothing Selected" {
> > ErrorMessage = ErrorMessage & "You must select at least one
> > incident
> > type<br>";
> > }
> > </cfscript>
> >
> > Please forgive me but I know little script and tend to try things in
the
> > way
> > I think they should work ...
> >
> >
> > Regards - Paul
> > </cfcase>
> >
> >
> > >From: "Michael Traher" <[EMAIL PROTECTED]>
> > >Reply-To: Coldfusion Development <[email protected]>
> > >To: "Coldfusion Development" <[email protected]>
> > >Subject: Re: [CF-Dev] This is driving me nuts .....
> > >Date: Thu, 23 Mar 2006 12:37:03 +0000
> > >
> > > >- see footer for list info -<
> > >you may get weird results in the future from converting dates (like
> > now())
> > >to strings using dateformat or lsdateformat and then doing date
>functions
> > >on
> > >them.
> > >
> > >most of the time it will work but it is always best to only do date
> > >functions on date objects then format to a string for output.
> > >
> > >that is why I suggested lsparsedate which will return a valid date
>object
> > >from your form variable. and you can use now() directly in the
> > >dateCompare.
> > >
> > >Just a warning - it has bitten me in the past. :-)
> > >
> > >
> > >
> > >On 3/23/06, Paul Swingewood <[EMAIL PROTECTED]> wrote:
> > > >
> > > > >- see footer for list info -<
> > > > Cracked it ...!
> > > >
> > > > Just needed a little sleep I think .....
> > > >
> > > > <!--- Validate the form fields in case JavaScript validation
failed.
> > >--->
> > > > <cfscript>
> > > > // Initialize variables;
> > > > ErrorMessage = "";
> > > > Todays_Date = lsdateformat(now(), "dd/mm/yyyy");
> > > >
> > > >
> > > > //Check the Incident date delimeters.
> > > > //if there aren't exactly 3 elements in this list
assuming
> > the
> > > > delimiter
> > > > is "/", it fails
> > > > IF (NOT ListLen(IncidentDate, "/") EQ 3){
> > > > ErrorMessage = ErrorMessage & "The Incident Date has an
>invalid
> > > > delimeter. - dd/mm/yyyy<br>";
> > > > }
> > > >
> > > > // IncidentDate.
> > > > if (NOT Len(Trim(IncidentDate)) OR NOT IsDate(IncidentDate)) {
> > > > ErrorMessage = ErrorMessage & "The Incident date is invalid.
-
> > > > dd/mm/yyyy<br>";
> > > > }
> > > >
> > > > // The incident can't be in the future.
> > > >
> > > > if (IsDate(IncidentDate) AND DateCompare(IncidentDate,
>Todays_Date)
> > >EQ
> > > > 1)
> > > > {
> > > > ErrorMessage = ErrorMessage & "You can not record an
incident
>in
> > >the
> > > > future!.<br>";
> > > > }
> > > >
> > > > </cfscript>
> > > >
> > > >
> > > > _______________________________________________
> > > >
> > > > For details on ALL mailing lists and for joining or leaving lists,
>go
> > to
> > > > http://list.cfdeveloper.co.uk/mailman/listinfo
> > > >
> > > > --
> > > > CFDeveloper Sponsors:-
> > > > >- Hosting provided by www.cfmxhosting.co.uk -<
> > > > >- Forum provided by www.fusetalk.com -<
> > > > >- DHTML Menus provided by www.APYCOM.com -<
> > > > >- Lists hosted by www.Gradwell.com -<
> > > > >- CFdeveloper is run by Russ Michaels, feel free to volunteer
your
> > help
> > > > -<
> > > >
> > >
> > >
> > >
> > >--
> > >Mike T
> > >Blog http://www.socialpoints.com/
> > >_______________________________________________
> > >
> > >For details on ALL mailing lists and for joining or leaving lists, go
>to
> > >http://list.cfdeveloper.co.uk/mailman/listinfo
> > >
> > >--
> > >CFDeveloper Sponsors:-
> > > >- Hosting provided by www.cfmxhosting.co.uk -<
> > > >- Forum provided by www.fusetalk.com -<
> > > >- DHTML Menus provided by www.APYCOM.com -<
> > > >- Lists hosted by www.Gradwell.com -<
> > > >- CFdeveloper is run by Russ Michaels, feel free to volunteer your
>help
> > >-<
> >
> >
> > _______________________________________________
> >
> > For details on ALL mailing lists and for joining or leaving lists, go
to
> > http://list.cfdeveloper.co.uk/mailman/listinfo
> >
> > --
> > CFDeveloper Sponsors:-
> > >- Hosting provided by www.cfmxhosting.co.uk -<
> > >- Forum provided by www.fusetalk.com -<
> > >- DHTML Menus provided by www.APYCOM.com -<
> > >- Lists hosted by www.Gradwell.com -<
> > >- CFdeveloper is run by Russ Michaels, feel free to volunteer your
help
> > -<
> >
>
>
>
>--
>Mike T
>Blog http://www.socialpoints.com/
>_______________________________________________
>
>For details on ALL mailing lists and for joining or leaving lists, go to
>http://list.cfdeveloper.co.uk/mailman/listinfo
>
>--
>CFDeveloper Sponsors:-
> >- Hosting provided by www.cfmxhosting.co.uk -<
> >- Forum provided by www.fusetalk.com -<
> >- DHTML Menus provided by www.APYCOM.com -<
> >- Lists hosted by www.Gradwell.com -<
> >- CFdeveloper is run by Russ Michaels, feel free to volunteer your help
>-<
_______________________________________________
For details on ALL mailing lists and for joining or leaving lists, go to
http://list.cfdeveloper.co.uk/mailman/listinfo
--
CFDeveloper Sponsors:-
>- Hosting provided by www.cfmxhosting.co.uk -<
>- Forum provided by www.fusetalk.com -<
>- DHTML Menus provided by www.APYCOM.com -<
>- Lists hosted by www.Gradwell.com -<
>- CFdeveloper is run by Russ Michaels, feel free to volunteer your help
-<
_______________________________________________
For details on ALL mailing lists and for joining or leaving lists, go to
http://list.cfdeveloper.co.uk/mailman/listinfo
--
CFDeveloper Sponsors:-
>- Hosting provided by www.cfmxhosting.co.uk -<
>- Forum provided by www.fusetalk.com -<
>- DHTML Menus provided by www.APYCOM.com -<
>- Lists hosted by www.Gradwell.com -<
>- CFdeveloper is run by Russ Michaels, feel free to volunteer your help
-<
_______________________________________________
For details on ALL mailing lists and for joining or leaving lists, go to
http://list.cfdeveloper.co.uk/mailman/listinfo
--
CFDeveloper Sponsors:-
- Hosting provided by www.cfmxhosting.co.uk -<
- Forum provided by www.fusetalk.com -<
- DHTML Menus provided by www.APYCOM.com -<
- Lists hosted by www.Gradwell.com -<
- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<