Have fixed this now by changing the event observer from the element to the update element line 90 controls.js
Event.observe(this.update, 'blur', this.onBlur.bindAsEventListener (this)); On 17 Feb, 13:08, Craig <cr...@europe.com> wrote: > Firefox probabaly ignores clicks on the scroll bar and thus does not > lose focus. Here is the main part of the code > > var auto_cust; > var auto_bran; > var auto_call; > > new Event.observe(window, 'load', pageload); > > function pageload() { > auto_cust = new Ajax.Autocompleter('customer', 'customer_auto', > 'logform_customer.asp', {minChars:-1,frequency:0.5,afterUpdateElement: > getCustomerId}); > auto_bran = new Ajax.Autocompleter('branch', 'branch_auto', > 'logform_branch.asp', {minChars:-1,frequency:0.5,callback: > customerCallback,afterUpdateElement: getBranchId}); > auto_call = new Ajax.Autocompleter('caller', 'caller_auto', > 'logform_caller.asp', {minChars:-1,frequency:0.5,callback: > customerCallback}); > > new Event.observe('customer', 'focus', acust); > new Event.observe('branch', 'focus', abran); > new Event.observe('caller', 'focus', acall); > $('customer').focus(); > > } > > function acust() > { > auto_cust.activate(); //twice because IE is clever > auto_cust.activate(); > > } > > function abran() > { > auto_bran.activate(); //twice because IE is clever > auto_bran.activate(); > > } > > function acall() > { > auto_call.activate(); //twice because IE is clever > auto_call.activate(); > > } > > function getBranchId(text, li) { > $('branch_id').value = li.id; > $('caller').focus(); > > } > > function getCustomerId(text, li) { > $('customer_id').value = li.id; > $('branch').value=''; > $('branch_id').value=''; > $('branch').focus(); > > } > > function customerCallback(element, entry) { > return entry + "&customer=" + $('customer_id').value; > > } > > On 17 Feb, 12:01, david <david.brill...@gmail.com> wrote: > > > Hi craig, > > > perhaps stupid remarks, but in FF the scrollbar is contained inb the > > element, not in IE. > > Couldn't it be something like that ?? > > > Can you send the code for the autocompleter ?? (just it, with > > callbacks definition ?? > > > -- > > david > > > On 17 fév, 12:48, Craig <cr...@europe.com> wrote: > > > > Sorry cant get an example online im afraid, should behave this way for > > > anyone who sets a height for the auto_complete div like so: > > > > div.auto_complete > > > { > > > position:absolute; > > > width: 350px; > > > max-height:200px; > > > overflow: auto; > > > overflow-x: hidden; > > > background: #fff; > > > z-index:101; > > > border:1px solid #888; > > > > } > > > > When clicking on the scroll bar it loses focus and closes the div. I > > > am currently trying to edit the onBlur function to check if focus is > > > still on this.update (the div) so i can set it to remain open. > > > > On 17 Feb, 11:00, david <david.brill...@gmail.com> wrote: > > > > > Hi craig, > > > > > not seems trivial, could we have an example? > > > > > -- > > > > david > > > > > On 17 fév, 11:03, Craig <cr...@europe.com> wrote: > > > > > > Am having one problem i cannot seem to solve. The autocompleter box > > > > > displays the results which has a set height so a scroll bar displays. > > > > > In FF but not other browsers when you scroll through the results it > > > > > works fine but in any other browser it will just lose focus and > > > > > disappear. > > > > > > Anyone come accross the same problem have a fix? Am using the latest > > > > > versions. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---