English 中文(简体)
暂停投票,要求一些帮助
原标题:jquery vote up down, request for some help

我想对以下法典作一些改动。

The above example shows calculated number of votes (vote ups - votes down). And when you click on any thumbe, it disappears the thumbs and shows the updated votes. I want to make changes that in begining it shows vote up and vote down separately (which are stored in database separately). and after thumb up or down is pressed, it should not remove the thumbs, but it should show the updated vote up and down separatetly. As shown in the image below. alt text

这里是法典的一部分:

Main page having html/CSS and jquery code. http://pastebin.com/RC6dj6N5

vote processng code: http://pastebin.com/heszKyDc

PS。 我试图自己改变,但我无法改变。 任何帮助都将经过大量评估。 感谢。

问题回答

这是一件容易的事,因为贵格会把你问到数据库中去,看看上去谁是谁,谁是谁? 每一次产出。

From here there is two ways(I would do the latter)
1: User clicks on a thumb and it posts back to the server and increments by 1(but there should be a rule to not become negative).

2: Use jQuery and ajax. Once the user clicks a thumb you use ajax to query the database and update the vote without a full page load. The ajax callback could update the vote at the page level.
Or
When the user clicks the thumb it auto increments the inner value by 1 and then updates the database behind the scenes, you could stop there or do #2 on the callback.

你们能否展示一下你们的ve子?

它认为,根据是否表决,而不是<条码>,必须退还<<0]/条码>或<条码>。

此外,除了《<代码>votes_count div in the html》外,还创造了一个顶点,一个可以取得亚克斯成功的最新情况。





相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签