Results 1 to 3 of 3

Thread: I need a hidden form that [BACk] won't retrigger

  1. #1
    Join Date
    Oct 2004
    Posts
    21

    Default I need a hidden form that [BACk] won't retrigger

    Hi,

    I have written some server side Javascript code that generates and transmits a form once an error is detected (during database access, for example). All works fine and I can hide the form from the sender.

    But I am stuck with the problem that the [Back] button (or command) resends that form again, and again and again .....

    I can't prevent a URL entering the history object (as far as I know) so I suspect that some smart code (generating a message ID and detecting that or something) is required.

    Before I do, is there anything built within FormMail that might help me prevent this occurring?

    Regards

    Nick

  2. #2
    Join Date
    Dec 2003
    Posts
    3,980

    Default Re: I need a hidden form that [BACk] won't retrigger

    Hi Nick,

    I think you'll need to use a temporary cookie to detect that the form has already been submitted.

    Cookies with JavaScript are reasonably easy and there's plenty of sample code around.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  3. #3
    Join Date
    Oct 2004
    Posts
    21

    Default Re: I need a hidden form that [BACk] won't retrigger

    Hi Russell,

    Yes - I was coming to the comclusion cookies (or asp session variables were the go, though I hadn't worled out the message id logic to go with it.

    I did find a suggestion (he used that horrible expression 'think outside the box') that has worked. If I use target="_new" then the reply from formmail appears in that window. That has no history and adding a window.close() button finishes it off. Not 100% ideal but close enough.

    Nick

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Going <Back but Page has Expired
    By ewel in forum FormMail Subscription Support
    Replies: 2
    Last Post: 07-Feb-2006, 09:07 AM
  2. Back link problem
    By JungleJap in forum FormMail Subscription Support
    Replies: 2
    Last Post: 08-Dec-2005, 10:31 PM
  3. Multipage forms, going back and subsequently losing data!
    By Martinjgriffiths in forum FormMail Subscription Support
    Replies: 1
    Last Post: 31-Jul-2005, 09:01 PM
  4. My hidden fields are not hidden at all!
    By mikie in forum FormMail Subscription Support
    Replies: 1
    Last Post: 04-Jul-2005, 08:26 PM
  5. fmbadhandler link back problem
    By frankherzog in forum FormMail Subscription Support
    Replies: 6
    Last Post: 25-Nov-2004, 10:58 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •