title: issue in setting value with javascript
body: <p>Hello guys I am making pagination in javascript (backbone.js) this is the overall template: (<a href="http://jsfiddle.net/LQg7W/2151/" rel="nofollow">http://jsfiddle.net/LQg7W/2151/</a> this jsfiddle is without css of course)</p>
  
  <pre><code> &lt;ul class="pagination"&gt;
          &lt;li class="arrow unavailable"&gt;&lt;a href=""&gt;Previous&lt;/a&gt;&lt;/li&gt;
          &lt;li class="current"&gt;&lt;a href=""&gt;1&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href=""&gt;2&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href=""&gt;3&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href=""&gt;4&lt;/a&gt;&lt;/li&gt;
          &lt;li class="unavailable"&gt;&lt;a href=""&gt;&amp;hellip;&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href=""&gt;12&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href=""&gt;13&lt;/a&gt;&lt;/li&gt;
          &lt;li class="arrow"&gt;&lt;a href=""&gt;Next&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
  </code></pre>
  
  <p>Suppose i want to have 10 pages, so I want to limit it with certain number of pages with for loop. so I am trying to change the above code but the code that I wrote does not work and something is wrong with javascript part. Since I am working in a complex system the error does not say much. Any idea?</p>
  
  <pre><code>&lt;ul class="pagination"&gt;
          &lt;li class="arrow unavailable"&gt;&lt;a href=""&gt;Previous&lt;/a&gt;&lt;/li&gt;
          &lt;li class="current"&gt;&lt;a href=""&gt;1&lt;/a&gt;&lt;/li&gt;
           &lt;% 
              for(var i = 0; i &lt; 10; ++i){ %&gt;
                  &lt;li&gt;&lt;a href=""&gt;i&lt;/a&gt;&lt;/li&gt;
              &lt;%  }
          }
      %&gt;
  
          &lt;li class="arrow"&gt;&lt;a href=""&gt;Next&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
  </code></pre>