开发者

How do I get a reorder-able, reloading list on a website?

I need a playlist that's editable from multiple computers. It can be <table> or <ol> but you must be able to drag rows around. This gets sent to the server, which pushes it down to everybody, so I need updates without reloading the page.

I never worked with JavaScript before, bu开发者_开发知识库t it all seems doable with http://jqueryui.com. Alternatives?

(the server seems the easier part, so I'll decide that depending on the widget, but I like Python)


Yes, you would use javascript to manage the table reordering, and ajax to query for the reordering. The interesting question is whether you want to poll or do server side push. ;)


You cannot push data to the client. Each webpage will have to poll the server for changes through XmlHttpRequest and update its contents with javaScript. You will have to handle all racing conditions on the server though.

If you haven't worked with javaScript before, your best bet would be to use jQuery and jQueryUI for everything, since it's easy to learn, and can easily achieve what you need.

Read the examples for: http://api.jquery.com/jQuery.ajax/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜