dongyimo1293 2012-06-23 14:25
浏览 43

如何插入到mysql数据库并使用相同的函数结果加载到<select> - > <option>?

I'm interested about Jquery and ajax to use with php&mysql.

I have been reading articles about loading intervall like 10 seconds. But that is not working with my page. (in select with 1000ms loading does load data every one second and unselects my option -box (i dont have idea how can i load that only if content changes..))..

I have page:

 <input type=text name=add_version value=>
 <input type=submit name=add value=add>

and

<select name=version>
<option><option>
<option value=1>v1.0</option>
<option value=2>v1.1.0</option>
</select>

How can i insert with ajax that "add_version" and load that same data to with one "submit" button?

or

does somebody have result for that loading content only when data changes in my MySQL DB?

thanks for help!

  • 写回答

1条回答 默认 最新

  • duan89197 2012-06-24 13:27
    关注

    With your comment clarification, I think you're looking for Long Polling. There are plugins that can do that for you, but I'm not sure how you want to go about it, so here are a couple of places to start looking at how you can.

    Was doing some additional research, and came across this most excellent tutorial about using node.js

    评论

报告相同问题?

悬赏问题

  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 unity第一人称射击小游戏,有demo,在原脚本的基础上进行修改以达到要求
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看
  • ¥15 关于#Java#的问题,如何解决?
  • ¥15 加热介质是液体,换热器壳侧导热系数和总的导热系数怎么算
  • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
  • ¥15 cmd cl 0x000007b
  • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line