title: how do I select a parameter a Javascript selector?
body: <p>Hi there (I'm a complete JS newbie so please no bullying)
  I'm trying to pass formID inside my score variable but I don't think I'm getting my selector right, can anyone tell me what I'm doing wrong ?</p>
  
  <p>Edit: Sorry everyone, I'm getting tired. My issue: I cannot properly select the value of my score var.</p>
  
  <p>JS</p>
  
  <pre><code>function addScore(formId) {
  var show_id = $('#show_id-'+formId).val();  
  var user_id = $('#user_id-'+formId).val();
  var score = $('input[value="tvshowrating' + formID +'"]').val();
  </code></pre>
  
  <p>HTML </p>
  
  <pre><code>    &lt;form id="40"&gt;
          &lt;div class="your-score"&gt;
              &lt;div class=""&gt;Your Score&lt;/div&gt; &lt;div id="flash"&gt;&lt;/div&gt;
               &lt;input class="hover-star" type="radio" name="tvshowrating40" value="1" title="1"  /&gt;
               &lt;input class="hover-star" type="radio" name="tvshowrating40" value="2" title="2"  /&gt;
               &lt;input class="hover-star" type="radio" name="tvshowrating40" value="3" title="3"  /&gt;
               &lt;input class="hover-star" type="radio" name="tvshowrating40" value="4" title="4"  /&gt;
               &lt;input class="hover-star" type="radio" name="tvshowrating40" value="5" title="5"  /&gt;
               &lt;input class="hover-star" type="radio" name="tvshowrating40" value="6" title="6"  /&gt;
               &lt;input class="hover-star" type="radio" name="tvshowrating40" value="7" title="7"  /&gt;
               &lt;input class="hover-star" type="radio" name="tvshowrating40" value="8" title="8"  /&gt;
               &lt;input class="hover-star" type="radio" name="tvshowrating40" value="9" title="9"  /&gt;
               &lt;input class="hover-star" type="radio" name="tvshowrating40" value="10" title="10"  /&gt;
               &lt;input type="hidden" id="show_id-40" value="40" /&gt; 
               &lt;input type="hidden" id="user_id-40" value="2" /&gt;
               &lt;span id="hover-test" style="margin:0 0 0 20px;"&gt;&lt;/span&gt;
               &lt;input id="submitscore" type="submit" value="Submit scores!" onclick="addScore(40);" /&gt;  
          &lt;/div&gt;
      &lt;/form&gt;
  &lt;/div&gt;
  </code></pre>