title: How do I make this Javascript function run?
body: <p>I'm trying to make an image captcha from scratch for a small project, but in the code below, I can't seem to manage to run the upRAns() function, I can't find the proper syntax anywhere. Any help?</p>
  
  <pre><code>for($i = 0; $i &lt; 9; $i++){
    $j = rand(1, 4);
    echo '&lt;img src="images/' . $j . '.png" height = 150 width = 150 class = captcha onclick = "captchaClick(this)" data-target=' . $i . '/&gt;';
    echo '&lt;input type=checkbox class=hidden name=' . $i . '/&gt;';
    if(($i+1)%3 == 0){
      echo '&lt;br&gt;';
    }
    if($j == $ans){
      echo '&lt;script src = "Captcha.js"&gt;upRAns(' . $i . ')&lt;/script&gt;'; //this line right here
    }
  }
  </code></pre>