title: How to split HTML code with javascript or JQuery
body: <p>I'm making a website using JSP and servlets and I have to now break up a list of radio buttons to insert a textarea and a button. I have got the button and textarea to hide and show when you click on the radio button it shows the text area and button. But this only appears at the top and when there are hundreds on the page this will become awkward so i need a way for it to appear underneath. Here is what my HTML looks like when complied: </p>
  
  <pre><code>&lt;form action="addSpotlight" method="POST"&gt;
          &lt;table&gt;
  
  
              &lt;tr&gt;&lt;td&gt;&lt;input type="radio" value="29" name="publicationIDs" &gt;&lt;/td&gt;&lt;td&gt;A System For Dynamic Server Allocation in Application Server Clusters, IEEE International Symposium on Parallel and Distributed Processsing with Applications, 2008&lt;/td&gt; &lt;/tr&gt;
  
  
              &lt;tr&gt;&lt;td&gt;&lt;input type="radio" value="30" name="publicationIDs" &gt;&lt;/td&gt;&lt;td&gt;Analysing BitTorrent's Seeding Strategies, 7th IEEE/IFIP International Conference on Embedded and Ubiquitous Computing (EUC-09), 2009&lt;/td&gt; &lt;/tr&gt;
  
  
              &lt;tr&gt;&lt;td&gt;&lt;input type="radio" value="31" name="publicationIDs" &gt;&lt;/td&gt;&lt;td&gt;The Effect of Server Reallocation Time in Dynamic Resource Allocation, UK Performance Engineering Workshop 2009, 2009&lt;/td&gt; &lt;/tr&gt;
  
  
              &lt;tr&gt;&lt;td&gt;&lt;input type="radio" value="32" name="publicationIDs" &gt;&lt;/td&gt;&lt;td&gt;idk, hello, 1992&lt;/td&gt; &lt;/tr&gt;
  
  
              &lt;tr&gt;&lt;td&gt;&lt;input type="radio" value="33" name="publicationIDs" &gt;&lt;/td&gt;&lt;td&gt;sad, safg, 1992&lt;/td&gt; &lt;/tr&gt;
  
  
              &lt;div class="abstractWriteup"&gt;&lt;textarea name="abstract"&gt;&lt;/textarea&gt;
              &lt;input type="submit" value="Add Spotlight"&gt;&lt;/div&gt;
  
          &lt;/table&gt;
      &lt;/form&gt;
  </code></pre>
  
  <p>Now here is what my JSP looks like: </p>
  
  <pre><code>&lt;form action="addSpotlight" method="POST"&gt;
          &lt;table&gt;
              &lt;%int i = 0; while(i&lt;ids.size()){%&gt;
  
              &lt;tr&gt;&lt;td&gt;&lt;input type="radio" value="&lt;%=ids.get(i)%&gt;" name="publicationIDs" &gt;&lt;/td&gt;&lt;td&gt;&lt;%=info.get(i)%&gt;&lt;/td&gt; &lt;/tr&gt;
              &lt;%i++; }%&gt;
  
              &lt;div class="abstractWriteup"&gt;&lt;textarea name="abstract"&gt;&lt;/textarea&gt;
              &lt;input type="submit" value="Add Spotlight"&gt;&lt;/div&gt;
  
          &lt;/table&gt;
      &lt;/form&gt;
  </code></pre>
  
  <p>Thanks in Advance<br>
  Dean</p>