<div dir="ltr">Thanks Damien!  We'll be giving this a try in the next week or 2 and will likely have more questions.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 5, 2016 at 2:42 PM, Damien Guillaume <span dir="ltr"><<a href="mailto:damieng@msu.edu" target="_blank">damieng@msu.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">OK, I think I found a more reliable way to get a reference to the input element.<br>
You have to set an id attribute to textline and to the response. The id of the input element will be "HWVAL_" + part_id + "_" response_id "_" + textline_id. You can then get the input element with document.getElementById(id). This is still undocumented, so I cannot ensure that it will keep working forever.<br>
<br>
An update to my example (still not tested!):<br>
<br>
<script src="/adm/jsme/jsme.nocache.js"></script><span class=""><br>
<script><br>
    var jsmeApplet;<br>
    function jsmeOnLoad() {<br>
        jsmeApplet = new JSApplet.JSME("jsme_container", "380px", "340px");<br>
        jsmeApplet.setCallBack("update_input", update_input);<br>
    }<br>
    function update_input(event) {<br></span>
        var part_id = "0";<br>
        var response_id = "custom-jsme-response";<br>
        var textline_id = "custom-jsme-textline";<br>
        var id = "HWVAL_" + part_id + "_" response_id "_" + textline_id;<br>
        var input = document.getElementById(id);<br>
        input.value = jsmeApplet.jmeFile();<br>
    }<br>
</script><span class=""><br>
<br>
<div id="jsme_container"></div><br>
<stringresponse id="custom-jsme-response"><br></span>
  <textline id="custom-jsme-textline"/><br>
</stringresponse><div class="HOEnZb"><div class="h5"><br>
<br>
<br>
Damien<br>
_______________________________________________<br>
LON-CAPA-users mailing list<br>
<a href="mailto:LON-CAPA-users@mail.lon-capa.org" target="_blank">LON-CAPA-users@mail.lon-capa.org</a><br>
<a href="http://mail.lon-capa.org/mailman/listinfo/lon-capa-users" rel="noreferrer" target="_blank">http://mail.lon-capa.org/mailman/listinfo/lon-capa-users</a><br>
</div></div></blockquote></div><br></div>