jquery 自动完成与 bgiframe 不适用于滚动条
现在我有一个带有自动完成功能的文本区域。当自动完成结果出现时,滚动条和边框不会被 bgiframe 覆盖。边框是黑色的。但左侧的灰色实际上来自自动完成窗口下方的选择框。
我如何让 bgiframe 来覆盖这个? 问题: https://i.sstatic.net/o7TLG.jpg
我正在运行 jquery 1.3.2 分钟并拥有最新的 bgiframe。另外,我针对这个问题修改了bgiframe: offsetHeight to scrollHeight
autocomplete:
$('#code').autocomplete(actionurl, {
width: 280,
selectFirst: false,
matchSubset: false,
minChars: 1,
max: 100
});
text area:
<input type="text" id="code" value="" maxlength="10" size="10" name="code"
autocomplete="off" class="ac_input">
更新:我将“$(”.ac_results”).bgiframe()”添加到我的操作的返回jsp中并且它起作用了。但是,自动完成认为 javascript 代码行是我的自动完成结果的一部分,并向结果列表添加了一个空行。看起来不太好。
更新 2:我尝试将 "$(".ac_results").bgiframe()" 绑定到 autocompleteopen 和 autocompletecreate 但这些事件从未触发。
Right now I have a text area with autocomplete. When the autocomplete results come up, the scrollbar and the borders are not being covered by bgiframe. The border is black. But on the left the gray is actually from the select box that's below the autocomplete window.
How do I get bgiframe to cover this?
Problem: https://i.sstatic.net/o7TLG.jpg
I'm running jquery 1.3.2 min and have the latest bgiframe. Also, I modified bgiframe for this problem: offsetHeight to scrollHeight
autocomplete:
$('#code').autocomplete(actionurl, {
width: 280,
selectFirst: false,
matchSubset: false,
minChars: 1,
max: 100
});
text area:
<input type="text" id="code" value="" maxlength="10" size="10" name="code"
autocomplete="off" class="ac_input">
Update: I added "$(".ac_results").bgiframe()" to the return jsp of my action and it worked. However, autocomplete thought that javascript code line was part of my autocomplete results and added a blank line to the result list. That doesn't look that great.
Update 2: I tried binding "$(".ac_results").bgiframe()" to autocompleteopen and autocompletecreate but those events never fired.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我找到了我的解决方案。嗯,更多的是一种解决方法。
右边的保管箱我切换到了一组收音机。
我通过添加“margin-left:1px;”修复了自动完成左侧的灰线。到自动完成下方的下拉菜单。
I found my solution. Well, more of a workaround.
The dropbox on the right I switched to a set of radios.
The gray lines on the left of the autocomplete I fixed by adding "margin-left:1px;" to the dropdowns below the autocomplete.