I currently have a script which, if the answer is correct, spits out an image. If it is a good answer it will give out a green checkmark, and if it is wrong it will give out a red cross.
However it doesn't spit out the image, any ideas?
I have the idea that the "image="src= ../../../image/goed.png" is wrong and should be replaced, I have no idea what would be the right code.
function schrijvenles1(){
var text = document.getElementById("schrijven-les1").value;
var:text;
//het antwoord is correct
if(text="Ik heet Marie." || "ik heet Marie." || "ik heet marie" || "Ik heet marie") {
image =" src=../../../image/goed.png";
}
// het antwoord is iets anders
else {
image = src="src=../../../image/fout.png";
document.getElementById("goed-fout") = image;
} }
this is the html code
<p id ="goed-fout"> </p>
<!-- geluidsfragment schrijfopdracht 1-->
<button id="voortgang-button" onclick="playMusic1()" value="button">
<img id="afspeelbutton" src ="../../../image/afspeelbutton1.png">
<audio
id="geluidsopname1" src="../../../voice-recording/marie.mp3">
</audio>
<input id="schrijven-les1" type="text" > </input>
</button>
<button
id="controle-luisteren" onclick="schrijvenles1()">Check
</button>[enter image description here][1]
there is an image addeed to the page, which will give you a better idea of how the page looks and maybe give some better insights.