4 Replies Latest reply on Aug 11, 2009 1:07 PM by Ronald Johnson

    datascroller oncomplete bug?

    Ronald Johnson Newbie

      Hi,

      i have two javascripts that are called onclick and oncomplete

      <rich:datascroller id="myId"
      renderIfSinglePage="false"
      onclick="inWork();"
      oncomplete="done();"/>
      


      the inWork() basically just displays a div "Please wait" and the done() hides the div again.

      It works fine if I click on the page numbers / fast forward buttons IF there are more pages.
      If I however is on the first page and clicks on the "<<" or "<" buttons
      (they are both dimmed out btw, but we know that that will not stop the users from still clicking them :)

      when one of those is clicked, the onclick-event is fired (i.e. my "Please Wait" div is displayed), but the oncomplete-event is NOT fired, meaning that my div does not go away.

      It works the same way for ">", ">>" when at the end of the list.

      It seems to be a bug in the datascroller component here. Either both events should be fired or none of them.

      Does anyone have a quick workaround?
      (Could i for example check some variable in javascript to see if the "<<" is dimmed out, and act accordingly?)