Re: Anyone using Twitter Bootstrap with CF?

2012-11-14 Thread Cameron Childress

On Wed, Nov 14, 2012 at 1:13 PM, Pete Ruckelshaus wrote:

> Yeah, that's what I get for just glancing at the docs.  This
> click me
> worked like a charm.


Great!


> Next up, is there a way to submit a form within the
> same modal window?  Sorry for the questions, I've been doing almost
> entirely server-side stuff for the past few years.
>

You can actually have someone submit the form in the modal just like any
other page. Then it will make a round trip tot he server and refresh the
underlying page (the one that opened the modal).

Alternately, you can have a button in the modal make a javascript call and
do a jQuery AJAX call to submit the data, without causing the underlying
page to refresh. You can then close the modal using some of the code you
should be able to find in the documentation.

There are a bunch of ways you can solve the problem, but I'd read up on the
whole she-bang a bit before trying to cut/paste anything from Stack
Overflow (or this list) to solve your problem. I'd put down the IDE for a
bit, get a coffee and take a long read in the jQuery docs around the AJAX
methods.

http://api.jquery.com/category/ajax/

You should be able to chain those calls along with the Bootstrap modal
stuff to get where you want to be.

-Cameron

-- 
Cameron Childress
--
p:   678.637.5072
im: cameroncf
facebook  |
twitter |
google+ 


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:353167
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Anyone using Twitter Bootstrap with CF?

2012-11-14 Thread Pete Ruckelshaus

Yeah, that's what I get for just glancing at the docs.  This

click me

worked like a charm.  Next up, is there a way to submit a form within the
same modal window?  Sorry for the questions, I've been doing almost
entirely server-side stuff for the past few years.

Thanks

Pete


On Wed, Nov 14, 2012 at 10:48 AM, Cameron Childress wrote:

>
> Look in the Bootstrap Modal docs under "Via Javascript". Specifically I've
> used the "remote" option to accomplish this. That way you can just pull the
> modal content off the server on-demand instead of using a static modal.
>
> http://twitter.github.com/bootstrap/javascript.html#modals
>
> -Cameron
>
> On Wed, Nov 14, 2012 at 10:37 AM, Pete Ruckelshaus
> wrote:
> >
> > I'm playing around with Twitter Bootstrap as a UI solution because, well,
> > my design skills are lacking.  I like it so far, but I want to use their
> > modal windows (not CF's) for forms that I use to add or edit records.
>  The
> > problem is, how do I pass dynamic variables (i.e. the ID of the record
> that
> > I want to edit) into what is essentially a static modal window that isn't
> > accessed via URL
>
>
>
> --
> Cameron Childress
> --
> p:   678.637.5072
> im: cameroncf
> facebook  |
> twitter |
> google+ 
>
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:353166
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: query: how to return records that are increments of one year old?

2012-11-14 Thread Leigh

Yep, there is always more than one way to skin a cat.  (Ouch... poor cats)

-Leigh


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:353165
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: query: how to return records that are increments of one year old?

2012-11-14 Thread Greg Morphis

a purely MSSQL way would be
SELECT DATEADD(dd, 0, DATEDIFF(dd, 0, DATEADD(yy, -1, GETDATE(

since 2005 doesn't support that.


On Wed, Nov 14, 2012 at 11:02 AM, Leigh  wrote:

>
> > cast(dateadd('y', -1, getdate()) as date) as  -- getdate() in MSSQL
>
> I do not think 2005 supports the "date" type. A CF alternative is using
> dateAdd("", -1, now()) to get the date and time one year ago. Then use
> cfqueryparam with type "cf_sql_date" which automatically drops any time
> portion.
>
> -Leigh
>
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:353164
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: query: how to return records that are increments of one year old?

2012-11-14 Thread Leigh

> cast(dateadd('y', -1, getdate()) as date) as  -- getdate() in MSSQL

I do not think 2005 supports the "date" type. A CF alternative is using 
dateAdd("", -1, now()) to get the date and time one year ago. Then use 
cfqueryparam with type "cf_sql_date" which automatically drops any time portion.

-Leigh


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:353163
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Anyone using Twitter Bootstrap with CF?

2012-11-14 Thread Cameron Childress

Look in the Bootstrap Modal docs under "Via Javascript". Specifically I've
used the "remote" option to accomplish this. That way you can just pull the
modal content off the server on-demand instead of using a static modal.

http://twitter.github.com/bootstrap/javascript.html#modals

-Cameron

On Wed, Nov 14, 2012 at 10:37 AM, Pete Ruckelshaus
wrote:
>
> I'm playing around with Twitter Bootstrap as a UI solution because, well,
> my design skills are lacking.  I like it so far, but I want to use their
> modal windows (not CF's) for forms that I use to add or edit records.  The
> problem is, how do I pass dynamic variables (i.e. the ID of the record that
> I want to edit) into what is essentially a static modal window that isn't
> accessed via URL



-- 
Cameron Childress
--
p:   678.637.5072
im: cameroncf
facebook  |
twitter |
google+ 


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:353162
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Anyone using Twitter Bootstrap with CF?

2012-11-14 Thread Pete Ruckelshaus

I'm playing around with Twitter Bootstrap as a UI solution because, well,
my design skills are lacking.  I like it so far, but I want to use their
modal windows (not CF's) for forms that I use to add or edit records.  The
problem is, how do I pass dynamic variables (i.e. the ID of the record that
I want to edit) into what is essentially a static modal window that isn't
accessed via URL?

Thanks,

Pete


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:353161
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: query: how to return records that are increments of one year old?

2012-11-14 Thread Eric Bourland

Greg, thank you very much. I will try this out and report my progress later
this evening.

Eric

-Original Message-
From: Greg Morphis [mailto:gmorp...@gmail.com] 
Sent: Wednesday, November 14, 2012 7:52 AM
To: cf-talk
Subject: Re: query: how to return records that are increments of one year
old?


cast(dateadd('y', -1, getdate()) as date) as  -- getdate() in MSSQL or
trunc(dateadd('y', -1, sysdate))  -- sysdate in Oracle




On Wed, Nov 14, 2012 at 7:46 AM, Greg Morphis  wrote:

> What DB are you using?
>
>
> On Wed, Nov 14, 2012 at 7:43 AM, Eric Bourland  wrote:
>
>>
>> Greetings. I need some advice again. I need to use CFSCHEDULE to 
>> schedule a task that does the following:
>>
>>
>>
>> * review all records in table 'membersTable', once per day
>>
>> * return records that are one year (365 days) old, then two years 
>> old, then three, and so on in increments of years
>>
>> * send a renewal reminder to the UserEmail associated with each found 
>> record
>>
>>
>>
>> But I am having trouble building the query to return records that are 
>> increments of one year old. How can I form this this query?
>>
>>
>>
>> The column "DateCreated" notes the date when a record was first created.
>>
>>
>>
>> 
>>
>> > datasource="#APPLICATION.dataSource#">
>>
>> SELECT UserID, FirstName, LastName, 
>> UserEmail, DateCreated
>>
>> FROM #REQUEST.membersTable#
>>
>> WHERE DateCreated = (DateCreated + 
>> increments of one year)
>>
>> 
>>
>>
>>
>> How should I form that WHERE clause? Thank you for any advice.
>>
>>
>>
>> Eric
>>
>>
>>
>>
>> 



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:353160
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: query: how to return records that are increments of one year old?

2012-11-14 Thread Greg Morphis

try that first one, I assume your date column in the DB is storing just the
date and not the datetime?
if it's storing datetime there would be a problem and you'd have to cast
that as a date too.


On Wed, Nov 14, 2012 at 7:52 AM, Greg Morphis  wrote:

> cast(dateadd('y', -1, getdate()) as date) as  -- getdate() in MSSQL
> or
> trunc(dateadd('y', -1, sysdate))  -- sysdate in Oracle
>
>
>
>
> On Wed, Nov 14, 2012 at 7:46 AM, Greg Morphis  wrote:
>
>> What DB are you using?
>>
>>
>> On Wed, Nov 14, 2012 at 7:43 AM, Eric Bourland wrote:
>>
>>>
>>> Greetings. I need some advice again. I need to use CFSCHEDULE to
>>> schedule a
>>> task that does the following:
>>>
>>>
>>>
>>> * review all records in table 'membersTable', once per day
>>>
>>> * return records that are one year (365 days) old, then two years old,
>>> then
>>> three, and so on in increments of years
>>>
>>> * send a renewal reminder to the UserEmail associated with each found
>>> record
>>>
>>>
>>>
>>> But I am having trouble building the query to return records that are
>>> increments of one year old. How can I form this this query?
>>>
>>>
>>>
>>> The column "DateCreated" notes the date when a record was first created.
>>>
>>>
>>>
>>> 
>>>
>>> >> datasource="#APPLICATION.dataSource#">
>>>
>>> SELECT UserID, FirstName, LastName,
>>> UserEmail, DateCreated
>>>
>>> FROM #REQUEST.membersTable#
>>>
>>> WHERE DateCreated = (DateCreated +
>>> increments of one year)
>>>
>>> 
>>>
>>>
>>>
>>> How should I form that WHERE clause? Thank you for any advice.
>>>
>>>
>>>
>>> Eric
>>>
>>>
>>>
>>>
>>> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:353159
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: query: how to return records that are increments of one year old?

2012-11-14 Thread Greg Morphis

cast(dateadd('y', -1, getdate()) as date) as  -- getdate() in MSSQL
or
trunc(dateadd('y', -1, sysdate))  -- sysdate in Oracle




On Wed, Nov 14, 2012 at 7:46 AM, Greg Morphis  wrote:

> What DB are you using?
>
>
> On Wed, Nov 14, 2012 at 7:43 AM, Eric Bourland  wrote:
>
>>
>> Greetings. I need some advice again. I need to use CFSCHEDULE to schedule
>> a
>> task that does the following:
>>
>>
>>
>> * review all records in table 'membersTable', once per day
>>
>> * return records that are one year (365 days) old, then two years old,
>> then
>> three, and so on in increments of years
>>
>> * send a renewal reminder to the UserEmail associated with each found
>> record
>>
>>
>>
>> But I am having trouble building the query to return records that are
>> increments of one year old. How can I form this this query?
>>
>>
>>
>> The column "DateCreated" notes the date when a record was first created.
>>
>>
>>
>> 
>>
>> > datasource="#APPLICATION.dataSource#">
>>
>> SELECT UserID, FirstName, LastName,
>> UserEmail, DateCreated
>>
>> FROM #REQUEST.membersTable#
>>
>> WHERE DateCreated = (DateCreated +
>> increments of one year)
>>
>> 
>>
>>
>>
>> How should I form that WHERE clause? Thank you for any advice.
>>
>>
>>
>> Eric
>>
>>
>>
>>
>> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:353158
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: query: how to return records that are increments of one year old?

2012-11-14 Thread Eric Bourland

MS SQL Server 2005
ColdFusion 9.0.1

-Original Message-
From: Greg Morphis [mailto:gmorp...@gmail.com] 
Sent: Wednesday, November 14, 2012 7:46 AM
To: cf-talk
Subject: Re: query: how to return records that are increments of one year
old?


What DB are you using?


On Wed, Nov 14, 2012 at 7:43 AM, Eric Bourland  wrote:

>
> Greetings. I need some advice again. I need to use CFSCHEDULE to 
> schedule a task that does the following:
>
>
>
> * review all records in table 'membersTable', once per day
>
> * return records that are one year (365 days) old, then two years old, 
> then three, and so on in increments of years
>
> * send a renewal reminder to the UserEmail associated with each found 
> record
>
>
>
> But I am having trouble building the query to return records that are 
> increments of one year old. How can I form this this query?
>
>
>
> The column "DateCreated" notes the date when a record was first created.
>
>
>
> 
>
>  datasource="#APPLICATION.dataSource#">
>
> SELECT UserID, FirstName, LastName, 
> UserEmail, DateCreated
>
> FROM #REQUEST.membersTable#
>
> WHERE DateCreated = (DateCreated + 
> increments of one year)
>
> 
>
>
>
> How should I form that WHERE clause? Thank you for any advice.
>
>
>
> Eric
>
>
>
>
> 



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:353157
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: query: how to return records that are increments of one year old?

2012-11-14 Thread Greg Morphis

What DB are you using?


On Wed, Nov 14, 2012 at 7:43 AM, Eric Bourland  wrote:

>
> Greetings. I need some advice again. I need to use CFSCHEDULE to schedule a
> task that does the following:
>
>
>
> * review all records in table 'membersTable', once per day
>
> * return records that are one year (365 days) old, then two years old, then
> three, and so on in increments of years
>
> * send a renewal reminder to the UserEmail associated with each found
> record
>
>
>
> But I am having trouble building the query to return records that are
> increments of one year old. How can I form this this query?
>
>
>
> The column "DateCreated" notes the date when a record was first created.
>
>
>
> 
>
>  datasource="#APPLICATION.dataSource#">
>
> SELECT UserID, FirstName, LastName,
> UserEmail, DateCreated
>
> FROM #REQUEST.membersTable#
>
> WHERE DateCreated = (DateCreated +
> increments of one year)
>
> 
>
>
>
> How should I form that WHERE clause? Thank you for any advice.
>
>
>
> Eric
>
>
>
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:353156
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


query: how to return records that are increments of one year old?

2012-11-14 Thread Eric Bourland

Greetings. I need some advice again. I need to use CFSCHEDULE to schedule a
task that does the following:

 

* review all records in table 'membersTable', once per day

* return records that are one year (365 days) old, then two years old, then
three, and so on in increments of years

* send a renewal reminder to the UserEmail associated with each found record

 

But I am having trouble building the query to return records that are
increments of one year old. How can I form this this query?

 

The column "DateCreated" notes the date when a record was first created.

 





SELECT UserID, FirstName, LastName,
UserEmail, DateCreated

FROM #REQUEST.membersTable#

WHERE DateCreated = (DateCreated +
increments of one year)



 

How should I form that WHERE clause? Thank you for any advice.



Eric




~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:353155
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm