RE: stop reposting of form data

2001-01-29 Thread Peter Theobald

Sounds like you are agreeing with me. By using CFLOCATION you are causing another 
round-trip from the server to the client back to the server and back to the client 
again.

At 10:46 AM 1/29/01 +1000, Darryl Lyons wrote:
>Fusebox does do that... You simply make the form action piont to an action
>fuse, (act_xxx_post or something) and then cfinclude the action template and
>then cflocation to a success page or anywhere else..
>
>-Original Message-
>From: Peter Theobald [mailto:[EMAIL PROTECTED]]
>Sent: Saturday, January 20, 2001 1:35 AM
>To: CF-Talk
>Subject: Re: stop reposting of form data
>
>
>I think this is how Fusebox gets around the problem of having all requests
>go to the same page (index.cfm) (dont quote me on that... I dont know much
>about Fusebox...)
>
>But the problem with this is you are causing another round-trip from the
>client to server and back again.
>
>Does anyone have a method that DOESN'T cause this delay?
>
>At 02:17 AM 11/19/00 -0600, Phoeun Pha wrote:
>>this is how i handle my stuff.  let's say we have 2 templates.  First
>>template has the form fields and stuff.  template 2 sends the information
>to
>>a database and also displays a "Thank You!" message.  if the user were to
>>click "Refresh",the information could be entered twice, thats bad!
>>
>>The solution is to have 3 templates.  First template has the form fields.
>>The second template does the dirty work, ya know, inserting stuff into
>>database. At the end of that template, do a CFLOCATION to template 3, which
>>says 'Thanx man, you've made me richer!".  Now, if the user refreshes, they
>>get the same message, but no form data is reposted.  cool eh?
>>
>>Considerations:  if u need to display some data from the form variables on
>>that last page, like "Thank you, [Name], yo've made me richer!" , i say do
>a
>>CFlocation (ex. url="thanxpage.cfm?name="Form.name")  in the middle
>template
>>with URL variables and display them on the third page.
>>
>>hope this helps!
>>
>>
>>
>>- Original Message -
>>From: Mike Grey <[EMAIL PROTECTED]>
>>To: CF-Talk <[EMAIL PROTECTED]>
>>Sent: Thursday, January 18, 2001 12:41 PM
>>Subject: stop reposting of form data
>>
>>
>>>
>>> What method is used to stop data from being reposted when a user attemps
>>to
>>> reload an action page.
>>>
>>> Thanks
>>>
>>> Mike Grey
>>>
>>>
>>>
>>>
>>
>
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: stop reposting of form data

2001-01-28 Thread Darryl Lyons

Fusebox does do that... You simply make the form action piont to an action
fuse, (act_xxx_post or something) and then cfinclude the action template and
then cflocation to a success page or anywhere else..

-Original Message-
From: Peter Theobald [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 20, 2001 1:35 AM
To: CF-Talk
Subject: Re: stop reposting of form data


I think this is how Fusebox gets around the problem of having all requests
go to the same page (index.cfm) (dont quote me on that... I dont know much
about Fusebox...)

But the problem with this is you are causing another round-trip from the
client to server and back again.

Does anyone have a method that DOESN'T cause this delay?

At 02:17 AM 11/19/00 -0600, Phoeun Pha wrote:
>this is how i handle my stuff.  let's say we have 2 templates.  First
>template has the form fields and stuff.  template 2 sends the information
to
>a database and also displays a "Thank You!" message.  if the user were to
>click "Refresh",the information could be entered twice, thats bad!
>
>The solution is to have 3 templates.  First template has the form fields.
>The second template does the dirty work, ya know, inserting stuff into
>database. At the end of that template, do a CFLOCATION to template 3, which
>says 'Thanx man, you've made me richer!".  Now, if the user refreshes, they
>get the same message, but no form data is reposted.  cool eh?
>
>Considerations:  if u need to display some data from the form variables on
>that last page, like "Thank you, [Name], yo've made me richer!" , i say do
a
>CFlocation (ex. url="thanxpage.cfm?name="Form.name")  in the middle
template
>with URL variables and display them on the third page.
>
>hope this helps!
>
>
>
>- Original Message -
>From: Mike Grey <[EMAIL PROTECTED]>
>To: CF-Talk <[EMAIL PROTECTED]>
>Sent: Thursday, January 18, 2001 12:41 PM
>Subject: stop reposting of form data
>
>
>>
>> What method is used to stop data from being reposted when a user attemps
>to
>> reload an action page.
>>
>> Thanks
>>
>> Mike Grey
>>
>>
>>
>>
>
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: stop reposting of form data

2001-01-19 Thread Roger B .

On Thu, 18 Jan 2001 13:41:41 -0500, "Mike Grey"
<[EMAIL PROTECTED]> wrote:

>What method is used to stop data from being reposted when a user attemps to
>reload an action page.

I use session variables. For example:




...various form stuff...





...SQL, logic and so on...




Obviously, you need to lock those session variables or Duplicate()
them into the request scope, but that's the basic idea.

--
Roger



~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: stop reposting of form data

2001-01-19 Thread William J Wheatley

Just use a http://www.aeps.com
ICQ: 417645
http://www.aeps2000.com
954-472-6684 X303

IMPORTANT NOTICE:
This e-mail and any attachment to it is intended only to be read or used by
the named addressee.  It is confidential and may contain legally privileged
information.  No confidentiality or privilege is waived or lost by any
mistaken transmission to you.  If you receive this e-mail in error, please
immediately delete it from your system and notify the sender.  You must not
disclose, copy or use any part of this e-mail if you are not the intended
recipient.  The RTA is not responsible for any unauthorized alterations to
this e-mail or attachment to it


-Original Message-
From: Stephen Kellogg [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 19, 2001 1:05 PM
To: CF-Talk
Subject: RE: stop reposting of form data


Just a quick thought, I'm sure I'll be told the pit falls if it's a bad idea
but...
Couldn't you, on successful insert etc., set a session or application
variable? The existence of or value of this variable could be checked at the
beginning of the action page and if isDefined or value = whatEverWasSet then
process accordingly otherwise do the insert etc.

Hope this helps

Stephen

-Original Message-
From: Angél Stewart [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 19, 2001 7:21 AM
To: CF-Talk
Subject: RE: stop reposting of form data




  How to block multiple form submits.






Dummy Form.












This submit button gets locked after it has been pressed, and a please wait
message is displayed.

(This code taken from CFVAULT.com)
:)

-Gel


-Original Message-
From: Mike Grey [mailto:[EMAIL PROTECTED]]

What method is used to stop data from being reposted when a user attemps to
reload an action page.
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: stop reposting of form data

2001-01-19 Thread Phoeun Pha

that wasn't the problem.  he wants to know how to handle situations where a
user REFRESHES a page after submitting a form (ya know, IE asks if ya want
to repost data).  and that enters data twice!

-Original Message-
From: Peter Theobald [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 19, 2001 9:30 AM
To: CF-Talk
Subject: Re: stop reposting of form data



You should prevent this both on the client side (for a nicer
interface) and on the server side (in case scripting is turned off, or a
hacker wants to mess with you by submitting his own form to your
scripts)

Server side:
Have a hidden field set to a random string (use CreateUUID) and save that
"transactionID" in the database. Dont let someone save the same
"transactionID" twice.
Client side:
When the user hits 'submit' change the submit button text to read
"Please wait..."
When the user hits 'submit' check to make sure the button still reads
"Submit" and not "Please wait..."

At 01:41 PM 1/18/01 -0500, Mike Grey wrote:

What method is used to stop data from being
reposted when a user attemps to
reload an action page.

Thanks

Mike Grey



~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: stop reposting of form data

2001-01-19 Thread Stephen Kellogg

Just a quick thought, I'm sure I'll be told the pit falls if it's a bad idea
but...
Couldn't you, on successful insert etc., set a session or application
variable? The existence of or value of this variable could be checked at the
beginning of the action page and if isDefined or value = whatEverWasSet then
process accordingly otherwise do the insert etc.

Hope this helps

Stephen

-Original Message-
From: Angél Stewart [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 19, 2001 7:21 AM
To: CF-Talk
Subject: RE: stop reposting of form data




  How to block multiple form submits.






Dummy Form.












This submit button gets locked after it has been pressed, and a please wait
message is displayed.

(This code taken from CFVAULT.com)
:)

-Gel


-Original Message-
From: Mike Grey [mailto:[EMAIL PROTECTED]]

What method is used to stop data from being reposted when a user attemps to
reload an action page.
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: stop reposting of form data

2001-01-19 Thread Jeremy Bunton

Now that is an interesting little trick. I think I will try that one. The
only way I could figure out how to do it was to query the bd first to see if
there was a record matching the info from the form and then do the
cflocation if a match was found, which would cause a performance decrease.
Thanks I'll use your method.

-Original Message-
From: Phoeun Pha [mailto:[EMAIL PROTECTED]]
Sent: Sunday, November 19, 2000 3:17 AM
To: CF-Talk
Subject: Re: stop reposting of form data


this is how i handle my stuff.  let's say we have 2 templates.  First
template has the form fields and stuff.  template 2 sends the information to
a database and also displays a "Thank You!" message.  if the user were to
click "Refresh",the information could be entered twice, thats bad!

The solution is to have 3 templates.  First template has the form fields.
The second template does the dirty work, ya know, inserting stuff into
database. At the end of that template, do a CFLOCATION to template 3, which
says 'Thanx man, you've made me richer!".  Now, if the user refreshes, they
get the same message, but no form data is reposted.  cool eh?

Considerations:  if u need to display some data from the form variables on
that last page, like "Thank you, [Name], yo've made me richer!" , i say do a
CFlocation (ex. url="thanxpage.cfm?name="Form.name")  in the middle template
with URL variables and display them on the third page.

hope this helps!



- Original Message -
From: Mike Grey <[EMAIL PROTECTED]>
To: CF-Talk <[EMAIL PROTECTED]>
Sent: Thursday, January 18, 2001 12:41 PM
Subject: stop reposting of form data


>
> What method is used to stop data from being reposted when a user attemps
to
> reload an action page.
>
> Thanks
>
> Mike Grey
>
>
>
>
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: stop reposting of form data

2001-01-19 Thread Philip Arnold - ASP

>  onClick="if(this.value == 'Submit Form') this.form.submit(); this.value =
> 'Please Wait.';">

Gel,

This is the whole discussion we've been having in the "Great idea Adam!"
thread

This relies on JavaScript, and won't work at all in all browsers (haven't
tried it without JS enabled, but I don't think it'll work)

Philip Arnold
Director
Certified ColdFusion Developer
ASP Multimedia Limited
T: +44 (0)20 8680 1133

"Websites for the real world"

**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**


~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: stop reposting of form data

2001-01-19 Thread Peter Theobald


You should prevent this both on the client side (for a nicer
interface) and on the server side (in case scripting is turned off, or a
hacker wants to mess with you by submitting his own form to your
scripts)

Server side:
Have a hidden field set to a random string (use CreateUUID) and save that
"transactionID" in the database. Dont let someone save the same
"transactionID" twice.
Client side:
When the user hits 'submit' change the submit button text to read
"Please wait..."
When the user hits 'submit' check to make sure the button still reads
"Submit" and not "Please wait..."

At 01:41 PM 1/18/01 -0500, Mike Grey wrote:

What method is used to stop data from being
reposted when a user attemps to
reload an action page.

Thanks

Mike Grey



~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: stop reposting of form data

2001-01-19 Thread Peter Theobald

I think this is how Fusebox gets around the problem of having all requests go to the 
same page (index.cfm) (dont quote me on that... I dont know much about Fusebox...)

But the problem with this is you are causing another round-trip from the client to 
server and back again.

Does anyone have a method that DOESN'T cause this delay?

At 02:17 AM 11/19/00 -0600, Phoeun Pha wrote:
>this is how i handle my stuff.  let's say we have 2 templates.  First
>template has the form fields and stuff.  template 2 sends the information to
>a database and also displays a "Thank You!" message.  if the user were to
>click "Refresh",the information could be entered twice, thats bad!
>
>The solution is to have 3 templates.  First template has the form fields.
>The second template does the dirty work, ya know, inserting stuff into
>database. At the end of that template, do a CFLOCATION to template 3, which
>says 'Thanx man, you've made me richer!".  Now, if the user refreshes, they
>get the same message, but no form data is reposted.  cool eh?
>
>Considerations:  if u need to display some data from the form variables on
>that last page, like "Thank you, [Name], yo've made me richer!" , i say do a
>CFlocation (ex. url="thanxpage.cfm?name="Form.name")  in the middle template
>with URL variables and display them on the third page.
>
>hope this helps!
>
>
>
>- Original Message -
>From: Mike Grey <[EMAIL PROTECTED]>
>To: CF-Talk <[EMAIL PROTECTED]>
>Sent: Thursday, January 18, 2001 12:41 PM
>Subject: stop reposting of form data
>
>
>>
>> What method is used to stop data from being reposted when a user attemps
>to
>> reload an action page.
>>
>> Thanks
>>
>> Mike Grey
>>
>>
>>
>>
>
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: stop reposting of form data

2001-01-19 Thread Angél Stewart



  How to block multiple form submits.






Dummy Form.












This submit button gets locked after it has been pressed, and a please wait
message is displayed.

(This code taken from CFVAULT.com)
:)

-Gel


-Original Message-
From: Mike Grey [mailto:[EMAIL PROTECTED]]

What method is used to stop data from being reposted when a user attemps to
reload an action page.


~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: stop reposting of form data

2001-01-19 Thread Phoeun Pha

this is how i handle my stuff.  let's say we have 2 templates.  First
template has the form fields and stuff.  template 2 sends the information to
a database and also displays a "Thank You!" message.  if the user were to
click "Refresh",the information could be entered twice, thats bad!

The solution is to have 3 templates.  First template has the form fields.
The second template does the dirty work, ya know, inserting stuff into
database. At the end of that template, do a CFLOCATION to template 3, which
says 'Thanx man, you've made me richer!".  Now, if the user refreshes, they
get the same message, but no form data is reposted.  cool eh?

Considerations:  if u need to display some data from the form variables on
that last page, like "Thank you, [Name], yo've made me richer!" , i say do a
CFlocation (ex. url="thanxpage.cfm?name="Form.name")  in the middle template
with URL variables and display them on the third page.

hope this helps!



- Original Message -
From: Mike Grey <[EMAIL PROTECTED]>
To: CF-Talk <[EMAIL PROTECTED]>
Sent: Thursday, January 18, 2001 12:41 PM
Subject: stop reposting of form data


>
> What method is used to stop data from being reposted when a user attemps
to
> reload an action page.
>
> Thanks
>
> Mike Grey
>
>
>
>
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists