I have an input event that I would like to trigger, when you click on a list item. Actually I call a function to check this field when it changes, but there is also an autocomplete script which combines anord catalog with just the input that you choose, which is the input Triggers a change while clicking an item to generate (which essentially triggers the new value before it is added). Here is the javascript code:
document.observe ('dom: loaded', function () {new Ajax.Autocompleter ("search_input", "found_input", "someurl.jsp", {after Update in: Update selected item, minChars: 2}); if ($ ('search_input')! = Undefined) {$ ('search_input'). Inspection ('change', function (E, L) {if (E.explicitOriginalTarget.up (1)! = Undefined & amp; e.explicitOriginalTarget.up (1) .id! = "Found_input") {check function (this.value);}}}}}}); I've added a clear area here because it works in the Mozilla Browser, but it's a Cross browser is not a solution. I also tried to add a variable when I click on an unordered list item, but it triggers after the search_input field as it comes in the DOM.
Edit Do:
Edit:
You can see here a little example: If you start typing in 'test', then you drop down the 2 options when you enter one Click on this change event And triggers a favorite event. If we click on the selection list, I want to stop the change event.
Here I believe that the solution to laughter:
What's going on It is that clicking on any of the auto-complete options, you are blurring the input field, so the change event is sent to the field by depositing what you typed and field. Before triggering that function to change the input content with the content you choose, before you are able to do click (which requires a mouse device) on the full option, is. This is the root cause of your problem. I do not fully understand why you are not following your self-selection, at least the event of another change is called Safari. I wonder if the program changes by changing the value of a program, then it can not change the event. I should know whether this is the case or not, but I have to test it. Any ideas?
Li> The event seems to be triggered by the onClick trigger before the form blurred (and therefore change the phargission). I re-ignite the incident of a change manually on the input field. I still had to set the change flag so that the search handler callback was not found for a single auto complete selection it is sometimes called Firefox. It was the biggest part of the callback, to back the actual workings of this callback, to organize the events, then change flag back. This is the biggest part, sorry. The point of note is that if you choose an autocomplete option, then the event of a change will be removed permanently, even if the price is not selected even if what was originally different than the input By avoiding this in the field, you can make more tinkers with autocomplete codes, which I want to keep in mind if you wish. Apart from this, I have just tested this in FF and Safari on a Mac, so that tests and things can be understood properly if it is going to produce.
Hope this works or at least gives you some ideas. If you or someone else takes a different on this problem (except for rewriting the different methodology), then I would love to hear it.
Comments
Post a Comment