2 Replies Latest reply on Aug 1, 2007 10:07 AM by brianpreuss

    suggestionbox - How to cancel request on blur

    brianpreuss

      Is there a possibility to cancel the ajax request if the user leaves the input field for which the suggestion should pop up (javascipt event onblur).

      Unfortunately I found no documentation nor description of such a feature.

      Thanks in advance for your help :)

        • 1. Re: suggestionbox - How to cancel request on blur
          brianpreuss

          Ok, maybe I wasn't clear enough about this topic :)

          The problem occurs if the execution of the suggestionAction takes a long time (one can simulate it by Thread.sleep(5000) in the action).

          When you are leaving the input field (which is "suggested"), then the suggestion box fill popup when the suggestionAction completes. I think that's not desiable ;)

          I did some research in a JavaScript debugger. There seems to be a problem either in the onblur or in the render function of the Suggestion.Base object.

          The onblur function sets a variable wasBlur to true. The render function does a check on the variable hasFocos, but not on wasBlur. Now there must be a bug somewhere :)

          Is this a known bug and if so is it corrected?

          I'm very interested in your replies :)

          • 2. Re: suggestionbox - How to cancel request on blur
            brianpreuss