Page 1 of 3 123 LastLast
Results 1 to 10 of 22

Thread: Clicking twice on save creates 2 records

  1. #1
    mikesolomon is offline Sugar Community Member
    Join Date
    Feb 2008
    Location
    UK
    Posts
    1,467

    Default Clicking twice on save creates 2 records

    When create a new record e.g case I sometimes get 2 records created

    This only appears to happen in IE when I have a slow connection to my server & the user gets impatient & clicks twice

    I can not recreate the issue using firefox

    Is this a known issue & how can I stop it happening?
    Last edited by mikesolomon; 2009-02-06 at 01:19 PM.
    Mike Solomon
    Development Manager
    Ivy Ltd
    www.ivy.ltd.uk]www.ivy.ltd.uk

    php version 5.2.6
    MySql 5.1.59

  2. #2
    crmsiva's Avatar
    crmsiva is offline A Sugar Hero
    Join Date
    Jan 2009
    Location
    Chennai, India
    Posts
    1,130

    Default Re: Clicking twice on save creates 2 records

    Hi

    You can change the code to disable the save button once it is clicked.

  3. #3
    mikesolomon is offline Sugar Community Member
    Join Date
    Feb 2008
    Location
    UK
    Posts
    1,467

    Default Re: Clicking twice on save creates 2 records

    Quote Originally Posted by crmsiva View Post
    Hi

    You can change the code to disable the save button once it is clicked.
    How would you do that?

    I looked at disabling it but had no luck
    Mike Solomon
    Development Manager
    Ivy Ltd
    www.ivy.ltd.uk]www.ivy.ltd.uk

    php version 5.2.6
    MySql 5.1.59

  4. #4
    crmsiva's Avatar
    crmsiva is offline A Sugar Hero
    Join Date
    Jan 2009
    Location
    Chennai, India
    Posts
    1,130

    Default Re: Clicking twice on save creates 2 records

    In which module you want this to be disabled?

  5. #5
    mikesolomon is offline Sugar Community Member
    Join Date
    Feb 2008
    Location
    UK
    Posts
    1,467

    Default Re: Clicking twice on save creates 2 records

    Quote Originally Posted by crmsiva View Post
    In which module you want this to be disabled?
    cases for a start

    once I know how to do it I can do it in all modules
    Mike Solomon
    Development Manager
    Ivy Ltd
    www.ivy.ltd.uk]www.ivy.ltd.uk

    php version 5.2.6
    MySql 5.1.59

  6. #6
    crmsiva's Avatar
    crmsiva is offline A Sugar Hero
    Join Date
    Jan 2009
    Location
    Chennai, India
    Posts
    1,130

    Default Re: Clicking twice on save creates 2 records

    Hi Mike,

    Please check the attachment, i added code for disabling save button.

    I set this.disabled=true; in the onclick of custom save button. Change your code as done in the attachment and dont forget to clear cache for cases module.

    editviewdefs.php

    Try this and let me know.

  7. #7
    DigiCRM is offline Senior Member
    Join Date
    Sep 2008
    Posts
    84

    Default Re: Clicking twice on save creates 2 records

    This can also happen if the user refreshes the page on a browser and sends the same data to the server again. Impatient users on a slow line can be bad.

  8. #8
    SugarDev.net is offline Sugar Community Member
    Join Date
    Feb 2008
    Posts
    1,401

    Default Re: Clicking twice on save creates 2 records

    Quote Originally Posted by DigiCRM View Post
    This can also happen if the user refreshes the page on a browser and sends the same data to the server again. Impatient users on a slow line can be bad.
    Sorry but this is not just applicable to impatient users. Sometimes the browser can cause error messages or timeouts which can cause this as well.

    I think Firefox checks for this from the client side. Another reason to ditch IE I'd say...
    Developers go here
    Businesses go there (Dutch)

    Modules:
    SugarDev.net Developer Tools | Config | Dutch Language Pack
    "Nothing gets fixed unless there is a bug"

  9. #9
    mikesolomon is offline Sugar Community Member
    Join Date
    Feb 2008
    Location
    UK
    Posts
    1,467

    Default Re: Clicking twice on save creates 2 records

    Quote Originally Posted by SugarDev.net View Post
    Sorry but this is not just applicable to impatient users. Sometimes the browser can cause error messages or timeouts which can cause this as well.

    I think Firefox checks for this from the client side. Another reason to ditch IE I'd say...
    Yup I agree, unfortunately I can't force my users to use firefox
    Mike Solomon
    Development Manager
    Ivy Ltd
    www.ivy.ltd.uk]www.ivy.ltd.uk

    php version 5.2.6
    MySql 5.1.59

  10. #10
    mikesolomon is offline Sugar Community Member
    Join Date
    Feb 2008
    Location
    UK
    Posts
    1,467

    Default Re: Clicking twice on save creates 2 records

    Quote Originally Posted by crmsiva View Post
    Hi Mike,

    Please check the attachment, i added code for disabling save button.

    I set this.disabled=true; in the onclick of custom save button. Change your code as done in the attachment and dont forget to clear cache for cases module.

    editviewdefs.php

    Try this and let me know.
    Thanks thats great
    Mike Solomon
    Development Manager
    Ivy Ltd
    www.ivy.ltd.uk]www.ivy.ltd.uk

    php version 5.2.6
    MySql 5.1.59

Page 1 of 3 123 LastLast

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Save creates two copies of a note
    By RayGarrison in forum Help
    Replies: 0
    Last Post: 2008-08-09, 03:47 PM
  2. Error when clicking save on "System Settings"
    By syvertsonj in forum Help
    Replies: 7
    Last Post: 2007-12-11, 07:15 PM
  3. Replies: 0
    Last Post: 2007-04-04, 05:21 PM
  4. Replies: 1
    Last Post: 2005-07-25, 03:23 PM

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
  •