From p.dalgaard at biostat.ku.dk  Sun Dec 28 21:42:46 2003
From: p.dalgaard at biostat.ku.dk (Peter Dalgaard)
Date: Sun Dec 28 21:41:00 2003
Subject: [Rd] Bug repository problem (PR#6168)
In-Reply-To: <Pine.LNX.4.44.0312282106330.1095-100000@kleigh.nl>
References: <Pine.LNX.4.44.0312282106330.1095-100000@kleigh.nl>
Message-ID: <x2ad5cy8qh.fsf@biostat.ku.dk>

Peter Kleiweg <kleiweg@let.rug.nl> writes:

> # aldus Peter Dalgaard :
> 
> >
> > OK, I see it. Mozilla does give a warning about "the page contains a
> > POSTDATA command, if you resend ... any action will be repeated..."
> > though. Is this any different with other browsers? And, more
> > importantly, is there a (simple, please) way to avoid it?
> 
> Don't give the user a reason to use the back-button. Perhaps,
> do something like:
> 
>    on.click( post(); alert("bug report sent"); history.go(-2); )

But this never goes near Java. It's all forms based, so the code that
does this is in a C program which says:

        < whopping big if construct>
        .....
        } else if (cgi_variable("newbug")) {
                print_title("%s - bug submission", lp_title());

                compose_bug_report();

        } else {
                print_title("%s - main page", lp_title());

                if (cgi_variable("sendbugreport")) {
                  send_bug_report();
                }
                main_page();
        }

        print_footer();

Hmm,.... send_bug_report, just sends a mail, then outputs

"<b>Submission successful</b><p>\n" 

changing the conditionals a bit and putting in an explicit "OK" button
to get back to the main page (or just put a link to the main page)
might do the trick?

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907


[Rd] Bug repository problem (PR#6168)
Peter Dalgaard