MathBench> How To

Radio Buttons with Feedback

Radio Buttons with Feedback

You need to enclose the problem in a div with a unique id. The question text should be in h2, then the options in a <ul> tag, with option_text: feedback. The only restriction in the list is, don't use colons for punctuation!

Finally, you need to include the util-Dom.js file, and call the prepareRButtons, passing the id of the div as a parameter. So, it looks like this:

<script type="text/javascript" src="../../jquery.js"></script>
<script language="javascript" src="../feedback1.js"></script>
<script src="../util-DOM.js"></script>

<script language="javascript">prepareRButtons("forfun");</script>

Question (id is "forfun")

Other elements in the div are not a problem ...

Be sure to check the feedback to see how the code works, and look at codeview as well


The code takes care of the rest of the formatting.


Make sure that jquery is included!!

Check the list structure, and check that you don't use more than one colon per list item.

At this time, html formatting in the answers or feedback is ignored.