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 ...
- ans1: feedback1 -- note that html code is ignored
- This one is a really long answer which does not contain any colons because that would mess it up!: feedback2
- ans3: This one is a pretty long feedback which does not contain any colons because that would mess it up! But it does change the size of the div.This one is a pretty long feedback which does not contain any colons because that would mess it up! But it does change the size of the div.This one is a pretty long feedback which does not contain any colons because that would mess it up! But it does change the size of the div.This one is a pretty long feedback which does not contain any colons because that would mess it up! But it does change the size of the div.This one is a pretty long feedback which does not contain any colons because that would mess it up! But it does change the size of the div.
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.
Trouble-shooting
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.
Copyright University of Maryland, 2007
You may link to this site for educational purposes.
Please do not copy without permission
requests/questions/feedback email: mathbench@umd.edu