Preventing duplicate form submission when page is loaded from history

Hi
We have record insertion forms some of which insert unique
records into sql databases and some which may not. Is there a way
of stopping the user pulling the page from history (or using the
back button) and then resubmitting the data?
I have put a trigger on the databases that basically updates
existing data rather than re-inserting it if a duplicate is entered
but as some of the record submissions are not unique this isn't
always possible. I would also rather restrict the submission client
side to reduce bandwidth and database calls.
I have tried various 'no caching' techniques on the page but
none seem to work. Anyone have any bright ideas ... I am all out of
ideas bright or not!!!
TIA
Karen

Karen
I have used session variables to control this sort of thing.
Basically the
insert/update statement tests for the existance of a variable
with a
particular name. If no variable exists then this will
indicate that the
request is coming from a history file, and it will not allow
the process.
Equally as part of the insert process change the value in the
variable and
do not allow and insert if the variable holds that value.
Paul Whitham
Certified Dreamweaver MX2004 Professional
Adobe Community Expert - Dreamweaver
Valleybiz Internet Design
www.valleybiz.net
"big_old_bird" <[email protected]> wrote in
message
news:e2totv$ec9$[email protected]..
> Hi
>
> We have record insertion forms some of which insert
unique records into
> sql
> databases and some which may not. Is there a way of
stopping the user
> pulling
> the page from history (or using the back button) and
then resubmitting the
> data?
>
> I have put a trigger on the databases that basically
updates existing data
> rather than re-inserting it if a duplicate is entered
but as some of the
> record
> submissions are not unique this isn't always possible. I
would also
> rather
> restrict the submission client side to reduce bandwidth
and database
> calls.
>
> I have tried various 'no caching' techniques on the page
but none seem to
> work. Anyone have any bright ideas ... I am all out of
ideas bright or
> not!!!
>
> TIA
> Karen
>

Similar Messages

  • Preventing duplicate form submission

    how do i prevent from the form being submitted twice in case user clicks the submit button twice?

    Search at the net "struts tokens".

  • Prevent duplicate form submission from same user

    What's the best way to prevent the same person/computer from
    submitting a form? I am wondering about cookies, ip address,
    etc.

    Rking1966 wrote
    I am wondering about cookies...
    You got me wondering, too. I thought of something like:
    formPage.cfm
    ============
    <cfif isDefined("cookie.isFormSubmitted") and
    cookie.isFormSubmitted>
    You have already submitted the form. You may only do so
    once.<br>
    <p>
    <a href="someOtherBusinessPage.cfm">To
    business</a>
    </p>
    <cfelse>
    <form action="actionPage.cfm" method="post">
    <input name="field1" type="Text">
    <input name="send" type="Submit" value="Send">
    </form>
    </cfif>
    actionPage.cfm
    =============
    <cfif NOT isDefined("cookie.isFormSubmitted")>
    <cfcookie name="isFormSubmitted" expires="never"
    value="true">
    </cfif>
    <!---
    Business code to process submitted form fields
    --->

  • Prevent Queries When Page First Loads

    Hi,
    How to Prevent Queries When Page First Loads: in this case #{!adfFacesContext.initialRender}
    didn’t works. and Jdeveloper 11.1.1.2.0.
    Please help me ..
    Thanks
    Anup

    Hi Mohammad Jabr,
    I have also set refresh property but not working..
    i have follow the link refer https://blogs.oracle.com/shay/entry/preventing_queries_when_page_f
    I want to prevent user to search without selecting any criteria.
    but this is not working..
    Please give any other solution..
    Thanks
    Anup
    Edited by: 888679 on Mar 13, 2013 10:46 PM

  • How to prevent dupilcate form submission in JSF 1.x

    Hi All
    How to prevent dupilcate form submission in JSF 1.x application. As of now ,when the user clicked the submit button two times , application inserts 2 records in database.
    Please suggest how to prevent dupliacte form submission without using Javascript. Kindlly share examples if any.
    Regards,
    DEV

    Your problem is not really double submission but the fact that your application allows double insertion. The fix is functionally easy but technically very cumbersome: before inserting, check if the data already exists. If you build in such a guard you also protect against other methods of causing a resubmission, such as the browser back button.
    PS: what's the deal with the no javascript limitation? You do realize that when you use JSF you're tanking your application full of javascript, right?

  • Jasper report on HTML when one image loaded from database and for the other

    How to generate jasper report on HTML when one image loaded from database and for the other we give a image path
    My code
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
              exporter = new JRHtmlExporter();
              exporter.setParameter(JRExporterParameter.JASPER_PRINT, print);
              exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, baos);
              exporter.setParameter(JRHtmlExporterParameter.IMAGES_URI, strImageInputDirectory);
         exporter.setParameter(JRHtmlExporterParameter.IMAGES_DIR_NAME, strImageOutputPath == null ? "." : strImageOutputPath);
         exporter.setParameter(JRHtmlExporterParameter.IS_OUTPUT_IMAGES_TO_DIR, Boolean.TRUE);
         exporter.setParameter(JRHtmlExporterParameter.IS_USING_IMAGES_TO_ALIGN, Boolean.FALSE);
         exporter.setParameter(JRHtmlExporterParameter.IS_WHITE_PAGE_BACKGROUND, Boolean.FALSE);
              exporter.exportReport();
              byte[] bdata = ((ByteArrayOutputStream) baos).toByteArray();
    Can any one help pls
    Message was edited by:
    ameet.au

    hey sorry for posting it in this forum.
    but do u have sample code for making it work.. since i am able to do it on PDF format(image from Database and another stored in the webserver) using
    byte image[] =(byte[]) outData.get("image");
                        ByteArrayInputStream img = new ByteArrayInputStream(image);
                        hmimg.put("P_PARAMV3", img);
    print = JasperFillManager.fillReport(reportFileName, hmimg, jrxmlds);
    bdata= JasperExportManager.exportReportToPdf(print);

  • Preventing the Duplicate Form Submission??

    Hi,
    How to prevent the duplicate form from been submitted without disabling the back button in IE???
    Thanks,
    JavaCrazyLover

    I had the same wonder. I found the following articles are quite helpful. They give detailed background info, a design pattern to deal with it, and a Struts implementation.
    http://www.theserverside.com/articles/content/RedirectAfterPost/article.html
    http://www.theserverside.com/articles/content/RedirectAfterPost2/article.html
    Cheers,
    littlemonster

  • Cursor in form field when page opens?

    Client wants cursor in first form text field when page opens,
    without the user clicking in that box. Must be possible, I just
    don't know how to do it.
    Thanks,
    Alan

    all you have to do is set an onload function for the page to
    set the focus of that text field
    <!-- this sets the focus of the text field when the page
    loads -->
    <body OnLoad="document.myform.txtfield.focus();">
    <!-- setting the names up on the form and fields makes the
    javascript work -->
    <form name="myform">
    <input name="txtfield" type="text">
    </form>

  • I get an error message when a page is loaded from another application

    When another application try's to load a webpage, I get a small dialog box. Across the top (border) is the webpage address, within the dialog box is the following, "there was a problem sending the command to the program".
    However, the page does load, but I have to keep clicking 'ok' to get rid of the dialog box

    You can't use Safari to download iPad apps. Only use iTunes/App Store.
     Cheers, Tom

  • Adding saved form fields when page count changes

    It appears that there isn't a way inside of EchoSign to apply a set of forms fields that has been saved to the templates if the new version of the form has a page added or deleted.
    It seems like it would either require the form fields to be edited outside of EchoSign or be recreated from scratch if the form adds or removes a page when it is updated.
    I would appreciate any insight or confirmation.

    The situation would be thus:
    The document for Form Z is created in a program such as Word and has several pages. The Word document is uploaded to EchoSign. This converts the Word Doc to a pdf, and then the form fields added in EchoSign. Then that EchoSign form is saved as a template (both document and form fields) in the Library.
    Now, the client who created the Word document comes back a year later with a revised version of the Word Doc that has one fewer page. If that new Doc is uploaded to EchoSign, the form fields from the first version of the form cannot be imported and applied to the new version because the number of pages in the new document doesn't match the number of pages in the old document.
    This appears to be similar to LiveCycle, where you cannot replace the background pdf unless the new file has the same number of pages as the old pdf.
    Unfortunately, it is quite common for these larger and more complex forms to add or delete pages when they are revised, and those are exactly the forms that one would want to avoid rebuilding from scratch.

  • I want to manuel set "bind varaiable" when page on load with ADF BC

    hi,
    I am opening a page from other page, opening page is query page that it must take its bind varaiable from main jspx page on ADF,
    how can I set bind varaiable for query when the page on load.
    or how can I qeury according to main page variable.

    Hi,
    you can write data to teh session and then reference this from teh bind variables on the opened page using EL
    e.g. #{sessionScope.departmentId}
    To set data to the session, you can use an ActionListener in ADF Faces
    from: #{row.departmentId.inputValue)
    to: #{sessionScope.deptId}
    The above copies the value of a selected table row to the session
    Frank

  • Placeholders display when page is loading

    Hi,
    I am using spry 1.6 and have made a page where data is loaded
    from XML and displayed using PagedView, when ever the page is being
    loaded for the first time I could see the dataset tags/placeholders
    being displayed like {ds_pageNumber}, {title}.
    Is there anyway to not show this when the page is loading.
    The URL
    http://demo.dci.in/galatta/v2/main2.html
    Demo Page
    This element is the images box's under the Trailers tab on
    top right side of the page.
    Any help would be appreciated.

    Hi,
    Check this sample:
    http://labs.adobe.com/technologies/spry/samples/data_region/HideDataReferencesSample.html

  • Set focus to specific field when page is loaded

    Hi
    simple login page (jsp) with 2 fields. when the page is loaded, I want the focus directly in the first field, so that the user can immediately start typing his userid. How do I do this with Creator 2?
    thanks, Peter

    thanks, I was missing the proper search term ... :-)
    here I found the answer: http://swforum.sun.com/jive/thread.jspa?forumID=123&threadID=63057
    Peter

  • How to execute a method when page is loaded

    hi ,
    I have a custom method in backing bean of a .jspx page. I want to execute it by default when the .jspx page is loaded.can anyone say how to do it?

    Hi,
    depends on what this is doing: You can call it in a PhaseListener, or from the page using a EL reference (e.g. output textfield that shows empty) or by customizing the ADF pagelifecyce.
    You may want to have a look at
    http://thepeninsulasedge.com/frank_nimphius/2007/08/09/jsf-hook-into-the-javaserver-faces-page-load/
    Frank

  • Finding out when page is loaded

    Im using setPage wit editorpane, just wondering how I find out when the page is fully loaded. Should I use threads?

    Nobody has found a way yet, that I've seen posted on the forum. A PropertyChangeEvent is fired when the initial page is loaded, but if that page needs to load images and stuff its creates a bunch of separate Threads to load the images. So no event is fired when everything is completely read.

Maybe you are looking for

  • F110 refuse customer amount

    Hi, We have credit balance on customer accounts and we want to refund them directly into their bank accounts. The document which I want to pay has payment term P14, i.e payed 14 days after baseline date (eg. 2010-03-31). But today I prepare a automac

  • Create Hyperlinks in a Form to a Bookmark in a PDF document

    I want to create a hyperlink in an Adobe Acrobat form created in Live Cycle Designer. I know how to create the link to the desired target pdf document, but would like the link to open at a specified bookmark within the linked pdf document. I cannot s

  • How to check No of Records in INfo Cube

    Hi Experts My Infocube consists of records in Millions...and i performed selective Deletion. Now can i check the No of records in the Info Cube Please update

  • How to Create a database copy and specify the source database.

    Hello, In my dag environment I would like to create a new database copy and specify the source. My company has database copies in 2 locations. Instead of transferring the data from one location to the other, I would like to specify the source be the

  • Multiple initializers for property dataProvider

    All I'm trying to do is display xml data from a Rails application in a list., but it doesn't like this:                     dataProvider="{student_requests.student_request}" It tells me "multiple initializers for property dataProvider". Any idea of h