How to Prevent User for Multiple click on form Submit button ??

Hi,
Is there any easy solution rather than AJAX or any HARD Solution.
to prevent user from being submit for only once...
So database record remain consistent rather than redundant.
if any JAVASCRIPT SOLUTION IT WOULD BE BETTER ONE.
WHAT SHOULD I DO ??

Use the disabled property, set it to true and then submit the form programmatically.
<html>
<head>
<script>
function validate()
     var textfield = document.getElementById('textfield');
     var submitButton = document.getElementById('submitbutton');
     var mainForm = document.getElementById('mainform');
     if ( textfield.value.length == 0 )
          alert("Validation Failed");
          return false;
     submitButton.disabled = true;
     alert("The button has been disabled, going to submit now");
     mainform.submit();     
</script>
</head>
<body>
<form id="mainform" action="#" method="GET">
<input type="text" value="" id="textfield"/>
<input type="submit" value="Try Me!" id="submitbutton" onclick="return validate();" />
</form>
</body>
</html>A reminder though, this is JavaScript and these are Java forums.

Similar Messages

  • Prevent user of multiple click / multiple enter of form with IE 7 or 8

    some days ago i focused on the problem "how to prevent the user pressing twice or even more times the enter button or clicking a button several times" in a jsf form. We are using Geronimo application server with myfaces implementation. In my tests the problem come's up with IE or Opera and hitting enter some times - Firefox does not lead to this problem. This problem is also discussed in
    [http://forums.sun.com/thread.jspa?threadID=665472] or in
    [http://book.javanb.com/the-java-developers-almanac-1-4/egs/javax.servlet.jsp/myformts.jsp.html-l=new.htm].
    However, the client side solutions don't work very good, especially preventing enter seems to be a hard problem. I'am wondering if somebody has got a very good working server side solution. I'am actually testing a solution where i render a time token in the form and save this in the session (a vector list). First request is passed (time token is saved in list), all subsequent request are blocked because the time token is already saved in the list. This works so far that only one request saves data. But i have got still 2 problems.
    - Concurrent access on the jsf (session scoped) backing bean leads to unpredictable errors.
    - Which response should i send back to the browser on blocked requests.
    Any idea?? Is there perhaps a good solution in the jsf framework??

    I would guess that the form has large number of fields with validation that may take some time to process on older systems. Not sure if it's feasible to try to reduce the form size and remove validations and required attributes to see if it helps.
    Can you also send the form url to [email protected] so we can investigate more.
    Thanks
    Roman

  • How to prevent user keyin wrong in master-detail

    How to prevent user keyin wrong in master-detail.
    Example : User click button to created mster with out crete detail then they going to another master record for created detail for that master,
    How to control user keyin master-detail currect record finish first then can go to another master?
    Is it posible if I will disable another record of master and enable only current record after they finish to keyin master and detail of this record then I enable all.
    If posible can you give me step-by-step and coding.
    Thank you very much

    I'm not able to understand the scenario. You probably will have to provide more detail of the issue.
    --Shiv                                                                                                                                                                                                                           

  • How to prevent user or group to use 3-tier WebI and DeskI in XI 3.1

    How to prevent user or group to use 3-tier WebI and DeskI in XI 3.1
    This function is enable in BOE 6.5 by using Supervisor.

    Hi,
    You can explicitly deny access to these applications from the CMC in BOE 3.1. Open the CMC, click on BusinessObjects Enterprise Application and then select the WebI.
    From the right hand side click on the 'Net Access' section for that group and disable the 'Log on to Web-Intelligence and view this object in CMC.'
    This will prevent the option of the WebI for that group.
    I hope this helps you.
    Regards,
    Prashant

  • FillBy always fills in the same row in data grid view. How to make it fill in a new row for each click of the Fillby Button? VB 2010 EXPRESS?

    Hi there, 
    I am a beginner in Visual Basic Express 2010. I have a Point of Sale program that uses DataGridView to display records from an external microsoft access
    database using the fillby query. 
    It works, but it repopulates the same row each time, but i want to be able to display multiple records at the same time, a new row should be filled for
    each click of the fillby button. 
    also I want to be able to delete any records if the customer suddenly decides to not buy an item after it has already been entered. 
    so actually 2 questions here: 
    1. how to populate a new row for each click of the fillby button 
    2. how to delete records from data grid view after an item has been entered 
    Thanks 
    Vishwas

    Hello,
    The FillBy method loads data according to what the results are from the SELECT statement, so if there is one row then you get one row in the DataGridView, have two rows then two rows show up.
    Some examples
    Form load populates our dataset with all data as it was defined with a plain SELECT statement. Button1 loads via a query I created after the fact to filter on a column, the next button adds a new row to the existing data. When adding a new row it is appended
    to the current data displayed and the primary key is a negative value but the new key is shown after pressing the save button on the BindingNavigator or there are other ways to get the new key by manually adding the row to the backend table bypassing the Adapter.
    The following article with code shows this but does not address adapters.
    Conceptually speaking the code in the second code block shows how to get the new key
    Public Class Form1
    Private Sub StudentsBindingNavigatorSaveItem_Click(
    sender As Object, e As EventArgs) Handles StudentsBindingNavigatorSaveItem.Click
    Me.Validate()
    Me.StudentsBindingSource.EndEdit()
    Me.TableAdapterManager.UpdateAll(Me.MyDataSet)
    End Sub
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    'TODO: This line of code loads data into the 'MyDataSet.Students' table. You can move, or remove it, as needed.
    Me.StudentsTableAdapter.Fill(Me.MyDataSet.Students)
    End Sub
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    Me.StudentsTableAdapter.FillBy(Me.MyDataSet.Students, ComboBox1.Text)
    End Sub
    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
    Me.MyDataSet.Students.AddStudentsRow("Jane", "Adams", "Female")
    End Sub
    End Class
    Get new key taken from
    this article.
    Public Function AddNewRow(ByVal sender As Customer, ByRef Identfier As Integer) As Boolean
    Dim Success As Boolean = True
    Try
    Using cn As New OleDb.OleDbConnection With {.ConnectionString = Builder.ConnectionString}
    Using cmd As New OleDb.OleDbCommand With {.Connection = cn}
    cmd.CommandText = InsertStatement
    cmd.Parameters.AddWithValue("@CompanyName", sender.CompanyName)
    cmd.Parameters.AddWithValue("@ContactName", sender.ContactName)
    cmd.Parameters.AddWithValue("@ContactTitle", sender.ContactTitle)
    cn.Open()
    cmd.ExecuteNonQuery()
    cmd.CommandText = "Select @@Identity"
    Identfier = CInt(cmd.ExecuteScalar)
    End Using
    End Using
    Catch ex As Exception
    Success = False
    End Try
    Return Success
    End Function
    In closing I have not given you a solution but hopefully given you some stuff/logic to assist with this issue, if not perhaps I missed what you want conceptually speaking.
    Additional resources
    http://msdn.microsoft.com/en-us/library/fxsa23t6.aspx
    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem.

  • How to prevent iTunes for Windows from "Updating iTunes Library"? (Library is on a NAS and managed by iTunes for Mac. Now getting update wars between Mac and Windows versions of the player.

    How to prevent iTunes for Windows from "Updating iTunes Library"?
    My library is on a NAS and managed by iTunes on a Mac. I can connect from wife's Windows laptop using iTunes for Windows but every time I do, it Updates iTunes Library. Next time I log in from my Mac it Updates iTunes Library in return. It appears I'm experiencing "Update Wars" between the Mac and Windows versions of iTunes. I would like to allow my wife to stream iTunes songs to her new laptop but I don't want any updates from this source... prefer to manage the library from my Mac and not allow Windows to do any thing other than listen to existing playlists.
    Thanks for any help/suggestions.

    Connect the PC to the library on the NAS. Wait while "updated".
    Under Edit > Preferences > Advanced make sure the media folder is correctly pointed at the media folder on the NAS. If not correct, close iTunes, wait a few moments, then open iTunes again.
    Close iTunes on the PC. Do not open iTunes on the Mac.
    Copy the library files, iTunes Library.itl, iTunes Library Extras.itdb, iTunes Library Genius.itdb, sentinel and the folder Album Artwork into an empty iTunes folder on the PC, for example C:\iTunes.
    Click the icon to start iTunes and immediately press and hold down SHIFT. Keep holding until prompted to choose or create a library. Click choose and browse to the copied .itl file, e.g. C:\iTunes\iTunes Library.itl
    The library should now work properly on the PC, however check the setting for the media folder. If needs be correct, close iTunes and reopen.
    Open iTunes on the Mac. It will update again, but that should be last time.
    tt2

  • !!!How to restrict user for making  changes in Sales order , partner level

    Hi all,
    Can anybody tell me how to restrict user for making  changes in Sales order  at partner level, is it through user exit?

    Hi Ruchi
    I hope u had gone to the screen fields which u want them not to be editable. So there u select all the fields contents which u do not want to to be changed and check the boxes with W.content and Display and save it. Once evrything is done u have to activate the particular transcation going in to the standard variants and put the name and click the activate button.
    Hope its clear
    Reward if help ful
    Sri

  • How to prevent users from creating new folders in share folder directory?

    Hello guys
    I'd like to know How to prevent users from creating new folders in share folder directory but still keep their power of creating new folders in their personal 'my folder'?
    I tried changing the 'manage privilage ---- create folder' to deny certain user accounts, but by doing so, it also stops the user from creating new folders in their 'my folder', which is not good..
    I also tried going into these share folders and tried different access types such as 'change/delete', 'read', 'traverse folder' etc, but none of it work ideally. The 'change/delete' access still allows them to create new folders, 'read' access prevents creating new folders but also take away their power of saving reports..
    Any thoughts on how to take away their ability to ONLY create new folders in share folder areas without affecting their other privileges?
    Please advise
    Thank you

    Easy, on the shared folders root folder only give them 'read' or 'traverse folder' but on the the folder inside the shared folders root folder give them 'change/delete'. That means they can change anything inside those folders but not create any folders at the shared folders root level.

  • How to sync user for planning from Shared Services

    Hi ..
    Can anybody please let me know how to sync users for planning from shared services.
    Thank you.

    You need to expand on your question.
    But the basic concept is you create or connect (for LDAP) users in Shared Services. You also create groups as required for these users. Then in shared services you provision those user to Planning applications (directly or indirectly through groups)
    Then in Planning you will see users or groups. And in planning you connect them to either members in dimensions or to objects like Forms, Task lists, Business Rules.
    There is therefore no such thing as synching Shared Services with Planning.
    Note: the 2 steps mentioned above can be done in batch through load utilities.
    Please expand you question if necessary

  • How to write code for page up and page down buttons on alv screen?

    Hi,
    Page up and page down buttons are not working in general alv report. Thease buttons are in disable mode. But is stnd. transactions (tcode : fbl5n)  these are enabled and working properly, but we can't debug this with /h
    How to write code for page up and page down buttons on alv screen?

    Poonam,
    On doing the screen debugging it took me over to    Include LSTXWFCC ,kindly check the below code.
    module cc_display.
      fcode = sy-ucomm(4).
      case sy-ucomm(4).
        when 'P--'.
          perform cc_firstpage.
        when 'P-'.
          perform cc_prevpage.
        when 'P+'.
          perform cc_nextpage.
        when 'P++'.
          perform cc_lastpage.
        when 'EX--'.
          perform cc_firstcopy.
        when 'EX-'.
          perform cc_prevcopy.
        when 'EX+'.
          perform cc_nextcopy.
        when 'EX++'.
          perform cc_lastcopy.
    I guess it can give you some lead.
    K.Kiran.

  • Call BADI  on click of a submit button in ESS

    Hi All,
    I am trying to call a function module ( i.e through BADI ) in a different browser by clicking on a submit button in Travel & Expenses Iview in ESS ( EP 6.0 ) but i didn't see any new window/ browser opened when i clicked on submit button.
    The BADI is activated and its working fine because the same functionality is working good when i tested this through trans. code  PR_WEB_1200. When i clicked on a submit button, a new browser was opened and the form was displayed the way we want in a different browser.
    But when i tested the same in ESS, i couldn't see any new browser or window opened. If the BADI was called when i clicked on the submit button atleast a new browser has to open with a blank page.
    Please guide me, If anybody knows, how to call a function module in a new browser by clicking on a button in ESS - Portal.
    Thanks.
    Anil

    Hi Jayesh,
      You can use the BADI BBP_CUF_BADI_2 to change the display from customer-defined fields to the SAP standard screen. This BAdI enables you to control whether the fields can be edited, and how they are displayed.
    MODIFY_SCREEN method will Show/hide field display and restrict edit options.
    For more information on BADI please go to SPRO -> BADI.
    OR  View the information on BADI's.
    http://help.sap.com/saphelp_nw04/helpdata/en/e6/d54d3c596f0b26e10000000a11402f/content.htm
    Hope above proves helpful to you.
    Regards,
    Rajeshree.

  • What license is required for import/export AcroForms and Submit button

    I want to know what kind of license do I need to programmatically interact with AcroForms and AcroFields for a asp.net web application.
    I use a third party software (Aspose) to import/export AcroField data value and also dynamically modify some of the fields.
    I also want to place a Submit button on the PDF so users can submit field data to a web server with free PDF readers.
    Have anyone done this before?

    Here are the steps I'm invisioning:
    1. The PDF form template is created with Acrobat Pro and Reader Rights is DISABLED.
    2. The user logins in to a web page and then clicks on a link to download the PDF template.
    3. Before the PDF is streamed to the client browser, the PDF template is modified with Aspose to fill in some personalized user data.
    4. User downloads a PDF with his/her data pre-filled.
    5. User saves and opens the PDF with PDF reader, fill in some more data and clicks on the Submit button on PDF.
    6. Submit button sends all the AcroFields that has data filled in back to a web server.
    7. Server processes the data accordingly.
    So, will a regular Acrobat Pro license be enough for this use?

  • When click on the submit button i got the below error.

    Hi Gurus,
    i am very new to oaf.
    i am trying to insert data into database tables.
    so i am entering the data and click on the submit button i got the below error in createPG rightside the top
    Error while creating a new entity row for NewManagerCustomTableEO
    Plz help me
    thanks
    latha.

    Hi,
    Please provide the code that u r using..
    Thanks
    Raghav.

  • How do I change the destination of a the submit button on a form in Form Central?

    How do I change the destination of a the submit button on a form in Form Central?

    Sure. Because it is a scheduling form and I want the filled out form to be forwarded to our scheduling department email.
    Sincerely,
    John Biester
    Operations Manager

  • How to restrict login for multiple users having same Role

    Our Web Application is deployed on Tomcat 5.5
    The requirement is ?
    There are roles in application like "operator", "admin"?
    There are multiple users created for each of the above role.
    When one user of "operator" role is logged in, then
    It should not allow to login for another user of "operator" role.
    Also, if user did not log out & application gets close, then
    It should not allow to login for another user of "operator" role.
    Also, it should not allow to login for multiple requests of same user
    (using another browser instance...)
    Is it possible using session object?
    But, using session object, it will create separate objects for different users,
    So here I will not be able to restrict session object creation rolewise.
    Also, how to retrieve these multiple session objects created for different users on server?
    If anyone is having the solution please reply as soon as possible,
    Thank you.

    To tell you the truth, this is a stupid requirement. It must be an extremely fragile application.
    In any case, you will have to write your stuff for that. Probably a filter that on login, logout, and session expiration checks, makes, or removes entries in a DB (using a synchronized resource to prevent race conditions) or possibly even simply in an application context object.

Maybe you are looking for

  • Mouse pointer hang in"hand" icon and won't select anything

    This happens in Ubuntu 11.4 with Firefox 13. While in Firefox the mouse pointer gets stuck in the 'hand' icon and will not select anything anymore either in or out of Firefox. I have only fixed this with a reboot

  • Sync Issues with iPhone 4/4S? I think I've found the problem.

    Hello all! I and quite a few others here have had syncing issues with our iPhone 4, and I think I've found a solution. I use an application called iToner 2 to create my ringtones, and after deleting all my iToner 2 created ringtones, I have no more s

  • STO Problem

    Hello, While creating STO order for intracompany process,i am facing error as 'Delivery type UL not allowed in purchase orders'. Why this message is coming?

  • Under and over delivery tolerance are not defaulted from Info record

    Under and over delivery tolerance are not defaulted from Info record. Does purchasing value key in material master has precedence over info record. What are the settings I have to check. Thnaks and regards, Suranjana

  • Simple Stream/String Manipulation

    I have a data stream that I am feeding into a method as a string, connects to a DB2 database and inserts the values contained in the string. Here is what the string looks like: ==SS39939294== 03012|39|33|32|2|232|9995 0333|34|007|32|2|7|95345 0392|39