- Posts: 8
- Thank you received: 0
Ask the community, share ideas, and connect with other LimeSurvey users!
Please Log in to join the conversation.
Please Log in to join the conversation.
<p id="rawScore">{score.value}</p> <p id="smartScore"> </p>
const raw = parseInt(document.getElementById('rawScore').innerText) const C = Math.floor(raw/1000000) const B = Math.floor((raw-C*1000000)/1000) const A = Math.floor((raw-C*1000000-B*1000)/1) const quotation = {"answered":A+B+C,"score":[A,B,C]} import {renderResult} from "/myLib.js" document.getElementById('smartScore').innerHTML = renderResult(quotation)
import <span class='em-expression em-haveerror' ><span class='em-error' title=' ' ><span title='Variable non définie' class='em-var em-var-error' >renderResult</span></span></span> from "/myLib.js"
Please Log in to join the conversation.
Please Log in to join the conversation.
const raw = parseInt(document.getElementById('rawScore').innerText) const C = Math.floor(raw/1000000) const B = Math.floor((raw-C*1000000)/1000) const A = Math.floor((raw-C*1000000-B*1000)/1) const quotation = {"answered":A+B+C,"score":[A,B,C]} import {renderResult} from "/myLib.js" document.getElementById('smartScore').innerHTML = renderResult(quotation)
const raw = parseInt(document.getElementById('rawScore').innerText) const C = Math.floor(raw/1000000) const B = Math.floor((raw-C*1000000)/1000) const A = Math.floor((raw-C*1000000-B*1000)/1) const quotation = <span class='em-expression em-haveerror' ><span class="em-var-string">"answered"</span><span class='em-error' title=' ' ><span title="Syntaxe non pris en charge"> : </span></span><span class='em-error' title=' ' ><span title='Variable non définie' class='em-var em-var-error' >A</span></span><span> + </span><span class='em-error' title=' ' ><span title='Variable non définie' class='em-var em-var-error' >B</span></span><span> + </span><span class='em-error' title=' ' ><span title='Variable non définie' class='em-var em-var-error' >C</span></span>, <span class="em-var-string">"score"</span><span class='em-error' title=' ' ><span title="Syntaxe non pris en charge"> : </span></span><span class='em-error' title=' ' ><span title="Syntaxe non pris en charge"> [ </span></span><span class='em-error' title=' ' ><span title='Variable non définie' class='em-var em-var-error' >A</span></span>, <span class='em-error' title=' ' ><span title='Variable non définie' class='em-var em-var-error' >B</span></span>, <span class='em-error' title=' ' ><span title='Variable non définie' class='em-var em-var-error' >C</span></span><span class='em-error' title=' ' ><span title="Syntaxe non pris en charge"> ] </span></span></span> import <span class='em-expression em-haveerror' ><span class='em-error' title=' ' ><span title='Variable non définie' class='em-var em-var-error' >renderResult</span></span></span> from "/myLib.js" document.getElementById('smartScore').innerHTML = renderResult(quotation)
Please Log in to join the conversation.
Please Log in to join the conversation.