dqyy38265 2012-05-30 09:19
浏览 54

输入中的Ajax自动完成已经关联了一些事件

I have a small project where i did a table excel-like. Each table cell contains a disabled input, and when you click any cell that input becomes enabled so you can type, changes the color of that cell+the entire row, and you can switch to next row using TAB, or next line using ENTER, or UP and DOWN for the cell above or below it. When the row is changed it will call an ajax function to update the data to the database.

That was the project description so far. My problem is:

I need to have auto-complete on some columns of the table. I tried so far Bootstrap typeahead, JqueryUI autocomplete and a couple of others more. None of them seem to work for my case. The main reason is that they overwrite my events.

I tried to add the autocomplete function on one specific cell only, to test how it works. And that cell won't become enable when i click it because my javascript is disabled by that autocomplete.

I tried to enable it from code to see how it works, and indeed the autocomplete seem to show up, but then my UP and DOWN arrowkeys are messed up.

Any idea on how to get an autocomplete to work on this case?

Thank you, any idea is much appreciated, I've been brainstorming on this for 2 days.

  • 写回答

1条回答 默认 最新

  • doushi1900 2012-05-30 13:26
    关注

    here is a very simple script that can do the Job... http://dev.twiip.ch/scripts/autocomplete/

    they link provide an easy example to select some data from a mysql database using php and ajax.

    it is in french, you can use google translate to understand.

    评论

报告相同问题?

悬赏问题

  • ¥15 csmar数据进行spss描述性统计分析
  • ¥15 各位请问平行检验趋势图这样要怎么调整?说标准差差异太大了
  • ¥15 delphi webbrowser组件网页下拉菜单自动选择问题
  • ¥15 wpf界面一直接收PLC给过来的信号,导致UI界面操作起来会卡顿
  • ¥15 init i2c:2 freq:100000[MAIXPY]: find ov2640[MAIXPY]: find ov sensor是main文件哪里有问题吗
  • ¥15 运动想象脑电信号数据集.vhdr
  • ¥15 三因素重复测量数据R语句编写,不存在交互作用
  • ¥15 微信会员卡等级和折扣规则
  • ¥15 微信公众平台自制会员卡可以通过收款码收款码收款进行自动积分吗
  • ¥15 随身WiFi网络灯亮但是没有网络,如何解决?