Hi All, I've recently had to figure out how to make the Scriptaculous AutoComplete functionality make it's selection box appear above the input. It's not a very elegant solution so was wondering if anyone had created a nicer one.
Basically I've hacked the controls.js file.. 1) I set a JS variable 'upDirection' to true on the page where the Autocompleter needs to slide up. 2) in controls.js I've changed it in two places... in baseInitialize after the line update.style.position = 'absolute'; // New Bit Start if (directionUp) { Position.clone(element, update, { setHeight: false, offsetLeft: -2, offsetTop: (0 - update.getDimensions().height) }); } else { Position.clone(element, update, { setHeight: false, offsetTop: element.offsetHeight }); } // New Bit End } and a similiar change in updateChoices: after the child node IF statement... } else { this.entryCount = 0; } // New Bit Start this.update.style.position = 'absolute'; if (directionUp) { Position.clone(this.element, this.update, { setHeight: false, offsetLeft: -2, offsetTop: (0 - this.update.getDimensions().height) }); } else { Position.clone(this.element, this.update, { setHeight: false, offsetTop: this.element.offsetHeight }); } Effect.Appear(this.update,{duration:0.15}); // New Bit End. this.stopIndicator(); this.update.scrollTop = 0; // RP - Part 3 of window jump fix this.index = 0; Has someone thought of a better way to do this? Perhaps one not involving hacking the changes.js file? Cheers Sukh -- 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-scriptacul...@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.