SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    May 2013
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    PHP: Double click "search" button and returns two identical tables

    My site uses PHP and you can make selections from 3 drop down boxes, then click on the "search" button to get the results.
    The issue is that most of the time the search takes a long time to load so the user clicks the "search" button again. When the page finally loads it shows the results in a table (correct), but there is a table for each time the "search" button is clicked while the page is loading.
    The user should be able to view the results and perform another search while in this same page. So disabling the search button after being clicked once will not work, as they need to be able to use the button again.

    My PM thinks it is just a packet/server glitch and not the site. I have tested it in IE and FF, same issue.

    How can this be fixed?

  2. #2
    SitePoint Evangelist captainccs's Avatar
    Join Date
    Mar 2004
    Location
    Caracas, Venezuela
    Posts
    516
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    The double clicking glitch is a normal occurrence when pages are slow to refresh. You might as well disable the submit button with javascript as it will be reenabled when the new page is displayed. If it's AJAX, enable the submit button when the new data arrives.
    Denny Schlesinger
    web services

  3. #3
    SitePoint Member
    Join Date
    May 2013
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you!!!!


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
  •