Domino Ajax Survey Database
Based on feedback to the latest article and having thought about it some more I've gone and made some changes to the demo db.
The main issue with the approach was that it used a link. The problem here is that a web-facing application is prone to web crawlers adding their votes without realising what they're doing. If you're using it on an intranet then you're ok, otherwise it's not perfect.
To get round this I've applied the same technique to a button on a new form in that database. Getting carried away with myself I also went and made it in to a more robust and "real-world" system that could potentially be of actual use. It's not a simple survey site with multiple answers and coloured bar charts of the results.
As an example here's a test survey I created — What is the best web server environment? I wonder what the result to that will be?
You can download the updated code in the article. It's still far from what I think a proper survey template should be like. This is because I wanted to demonstrate the underlying principles more than I wanted to make it a plug-n-play template. That said, an upcoming requirement I have is to add surveys to a site (part of the reason I could afford the time to do this), so I'll be adding improving this database as I go along.
Jake,
Thanks for this great demo db. Your efforts are appreciated.
This is quite a nice poll using AJAX that would work with domino...
{Link}
Nothing happened when I clicked on the button in Opera (9.21), so I ended up clicking several times.
To stop the user from clicking more than one time, you could add, to the onclick, this.disabled = "disabled" (XTML 1.1 strict-friendly), or the simpler version, this.disabled = true
Opera? What's that? :o)
It's a browser from the people that has polar bears roaming the streets.. ;)
Now that is proper. Use of buttons like this with links (that perform simple GET operations) from your previous write-up, should form the base of a gracefully degrading web-app (version number intentionally withheld)
Jake, Opera is a program that sings the HTML to the window. People who love Opera download it and many times can't get the notes right up there failing to open the web pages. Its not even a browser. I mean why would anybody still use it is beyond rationalizing music.