Examples - Instant Voting

In this example we create a voting box that immediately shows the results after submitted. Since we're using Ajax we don't need to reload the page or use frames.

A sample code:

---Form to submit your vote---
<div id="mydiv">
    Is this example useful to you?
    <input name="answer" type="radio" value="No" /> No
    <input name="answer" type="radio" value="Yes" /> Yes
    <input type="button" value="Submit"
        onclick="dynajax.request('respfile: vote.php; resultloc: mydiv; paramloc: mydiv;');"/>
</div>


The votebox in action

Is this example useful to you?

Yes

No



Click here to open the page again

Notes:


Click here to proceed to the next example
Click here to get DynAjax