Re: Dynamic Form

2009-09-24 Thread Brian Victor
victorsubervi wrote: > On Wed, Sep 23, 2009 at 9:13 PM, BJ Swope wrote: >> Is your web browser re-submitting the form with the same data if you >> refresh the screen? > yes I'm surprised no one has mentioned this before, but the standard approach to this problem is to redirect after a successful

Re: Dynamic Form

2009-09-24 Thread BJ Swope
1. Did you try the headers for no-caching of the page? 2. If you wish to avoid dupes in a DB, Primary Keys are the tool to prevent duplicates. On Thu, Sep 24, 2009 at 11:01 AM, victorsubervi wrote: > in line... > > On Wed, Sep 23, 2009 at 9:13 PM, BJ Swope wrote: > >> What is your code not doin

Re: Dynamic Form

2009-09-24 Thread victorsubervi
in line... On Wed, Sep 23, 2009 at 9:13 PM, BJ Swope wrote: > What is your code not doing? > see below > > Are you winding up with duplicate data in the DB? > yes > > Is your web browser re-submitting the form with the same data if you > refresh the screen? > yes > > Is your web browser pr

Re: Dynamic Form

2009-09-23 Thread BJ Swope
What is your code not doing? Are you winding up with duplicate data in the DB? Is your web browser re-submitting the form with the same data if you refresh the screen? Is your web browser pre-filling the fields of the form due to caching? I don't understand what's not working On Wed, Sep 23, 2

Re: Dynamic Form

2009-09-23 Thread Victor Subervi
I've been trying the hidden field, but the problem is that when I set the variable flag, it stays in memory. I would rather just pass a var like I've been trying, but I don't think it's possible. Any ideas? Is a session cookie the only way? Here's more simplified code: #!/usr/bin/python import cg

Re: Dynamic Form

2009-09-22 Thread BJ Swope
If you are trying to avoid the browser caching the pages so that they fetch a new copy of the page every time, add the following 2 meta tags to the header of the html page: Those don't guarantee that the browser won't cache the page but it should help the situation. If on the other hand, you o

Re: Dynamic Form

2009-09-22 Thread Victor Subervi
Well it's Web stuff, sure, but it's written in python :) The code follows. The problem is that I haven't figured out how to tell the program that the user has entered data and to clear the cache of that data so that it's not re-entered. How do I do that? TIA, Victor #!/usr/bin/python import cgitb

Re: Dynamic Form--Potential purge cache?

2009-09-22 Thread bouncy...@gmail.com
: Re: Dynamic Form On Tue, Sep 22, 2009 at 10:46 AM, Victor Subervi wrote: > Hi; > I have a dynamic form in which I do the following: > 1) Request two fields (company name, number of entries). That is sent back > to the form. > 2) If the two fields are not None, the form requests o

Re: Dynamic Form

2009-09-22 Thread Simon Forman
On Tue, Sep 22, 2009 at 10:46 AM, Victor Subervi wrote: > Hi; > I have a dynamic form in which I do the following: > 1) Request two fields (company name, number of entries). That is sent back > to the form. > 2) If the two fields are not None, the form requests other data. That, too, > is sent bac