Script error for custom item using multiple variables, form (case 22425)
Script error for custom item using multiple variables, form (case 22425)
I need multiple fill-in-the-blank items on a single screen, so I created a multiple-variable form by following the instructions in "Sample 5: custom items - multiple variables."
I made only minor changes to the html provided on this Empirisoft page when making my own, but I'm getting the following script error when I run it: "object doesn't support property or method focus"
Here is my html:
<!-- saved from url=(0013)about:internet -->
<style><ml.styles></style>
<body onload="document.form.name.focus();">
<form name="form" method="post"><br>Think about your next exam. How do you plan to study for it? Assign each strategy a percentage (the total should equal 100%).<br>
<ml.wording><br><br>
<table>
<tr><td> Reviewing the textbook or other readings </td><td> <input name="<ml.totals>_01"></td></tr>
<tr><td> Re-reading your own notes </td><td> <input name="<ml.totals>_02"></td></tr>
<tr><td> Discussing the material with other students or a tutor </td><td> <input name="<ml.totals>_03"></td></tr>
<tr><td> Making flashcards and quizzing yourself with them </td><td> <input name="<ml.totals>_04"></td></tr>
<tr><td> Quizzing yourself on material in a way other than using flashcards </td><td> <input name="<ml.totals>_05"></td></tr>
<tr><td> Re-writing your notes </td><td> <input name="<ml.totals>_06"></td></tr>
<tr><td> <br><input type="submit" value="Continue"></td></tr>
</table>
</form>
</body>
Thanks in advance!
Please upload the .htm and .que files that you are using to run this code in MediaLab.
What version of Internet Explorer and MediaLab do you have? You can find the version of MediaLab (v.20xx.x.xxx) by opening the MediaLab.exe file and looking in the upper left corner of the main program window.
Please upload the .htm and .que files that you are using to run this code in MediaLab.
What version of Internet Explorer and MediaLab do you have? You can find the version of MediaLab (v.20xx.x.xxx) by opening the MediaLab.exe file and looking in the upper left corner of the main program window.
I was using version 2012, but I actually gave up on creating a form and had participants complete a paper survey for this particular task instead. (So I no longer need assistance.) Thanks for the help, though.
I'm glad to hear that you found a workaround.
After playing with your html code, it appears that the script error was related to this line of code:
<body onload="document.form.name.focus();">
I created a Custom item (see attached files) without that line in it and based on the same Sample code you used. I also changed the <ml.totals> to <ml.varname> to get the responses in the boxes to record in the MediaLab data file. Where did you get the use of <ml.totals>?
It ran on MediaLab 2014 without the script error box and successfully recording the data. Feel free to take a look. After downloading the .txt file, make sure to change the file format to .htm to use it with the .que file.