Displaying 2 results from an estimated 2 matches for "answersbody".
2006 Jul 14
3
Rails newbie: How does the submit_tag work?
...adding="3" cellspacing="0" id="answersTable">
<thead>
<tr>
<td></td>
<td>Check</td>
<td></td>
<td>Possible Answers</td>
</tr>
</thead>
<tbody id="answersBody">
<%
if !@question.id.nil?
answers = Answers.find (:all, :conditions => "parent_id = " +
@question.id.to_s)
for answer in answers
presentation = Presentations.find_by_id
(answer.presentation_id.to_s);
-%>
<tr>
<td><input ty...
2006 Jun 03
12
How to get dynamically created inputs from html form back to rails app
...f evident in the
books I have available.
The following javascript is the code that inserts the new row into the
table in the browser context (not the backing RDBMS):
function insertAnswer () {
table = document.getElementById ("answersTable");
body = document.getElementById ("answersBody");
row = document.createElement("tr");
row.setAttribute("id","");
// need to build a Ruby friendly naming scheme for
// elements so they can be passed as parameters
data = document.createElement("td");
row.appendChild(data);
data = docu...