Hello everyone,

I was wondering if anyone might have some suggestions on how to fix this problem. I'm working with the Scrip.aculo.us library trying to build in the AJAX Autocompleter for a listing of employees. The data large are rather large, so the default method of using list elements won't work. I've hacked it enough to work with table cells contained in a scrollable div, but IE seems to be causing some problems. When a user tries to scroll through the record-set returned from AJAX, the onBlur event fires on the field and blanks out the results grid. I've tried to detect the what has been clicked and preform the appropriate action based on that, but that doesn't seem to work right either.

If anyone has a suggestion on how to use the scroll bar without the onBlur event firing, please let me know.

Thanks!

Jordan

onBlur event:

onBlur: function(event) {
    // needed to make click events working
    setTimeout(this.hide.bind(this), 250);
    this.hasFocus = false;
    this.active = false;    
  },

hide function:

  hide: function() {
    this.stopIndicator();
    if(Element.getStyle(this.update, 'display')!='none') this.options.onHide(this.element, this.update);
    if(this.iefix) Element.hide(this.iefix);
  },

and the code from the AJAX CFM file

<div style="overflow-x: auto; overflow-y: hidden; width: 500px;" id="scroller" >
                            <table cellpadding="2" cellspacing="0">
                                <tbody>
                                    <Cfloop from="1" to="#variables.Rows#" index="variables.o">
                                        <tr valign="top" style="background-color:<cfif variables.o MOD 2 EQ 0>#Application.columnbgcolor1#<cfelse>#Application.columnbgcolor2#</cfif>">
                                            <cfloop from="1" to="#variables.cols#" index="i">
                                                <cfif variables.ctr LTE variables.getEmployees.RecordCount>
                                                    <td class="contacts" nowrap="true" style="cursor: pointer; width: 165px;" >
                                                        <div class="name" FULL_NAME="#Trim(HTMLEditFormat(variables.getEmployees.FULLNAME[variables.ctr]))#" EMPLOYEE_ID="#variables.getEmployees.EMPLOYEE_ID[variables.ctr]#">
                                                            #Trim(HTMLEditFormat(variables.getEmployees.FULLNAME[variables.ctr]))#
                                                        </div>
                                                           <div class="informal">
                                                               #HTMLEditFormat(variables.getEmployees.Job_Title[variables.ctr])#<br />
                                                               (#HTMLEditFormat(variables.getEmployees.Employee_ID[variables.ctr])#)
                                                           </div>
                                                        <cfscript>
                                                            variables.ctr = variables.ctr + 1;
                                                        </cfscript>
                                                    </td>
                                                <cfelse>
                                                    <td class="contacts" nowrap="true" style="width: 165px;"  >
                                                        <img src="" width="1" height="1" />
                                                    </td>
                                                </cfif>
                                            </cfloop>
                                        </tr>
                                    </cfloop>
                                </tbody>
                            </table>
                        </div>
_______________________________________________
Reply to DFWCFUG: 
  [email protected]
Subscribe/Unsubscribe: 
  http://lists1.safesecureweb.com/mailman/listinfo/list
List Archives: 
    http://www.mail-archive.com/list%40list.dfwcfug.org/             
  http://www.mail-archive.com/list%40dfwcfug.org/
DFWCFUG Sponsors: 
  www.HostMySite.com 
  www.teksystems.com/

Reply via email to