Javascript code not being executed
<p>I have a nested ListView (Master/Detail) questionaire that was described in <a href="http://stackoverflow.com/questions/4823969/including-listitem-variables-in-javascript-function-call">this</a> posting: The inner list item must call a server method with three arguments. Thanks to several of you, I have code that properly generates the JavaScript; however, that code is not actually firing. Here is the declaration of the inner list view:</p>

<pre><code>&lt;asp:ListView ID="lstAnswers" runat="server" DataKeyNames="QuestionID" OnItemDataBound="lstAnswers_ItemDataBound"&gt;
      &lt;LayoutTemplate&gt;
        &lt;tr id="ItemPlaceholder" runat="server" /&gt;
      &lt;/LayoutTemplate&gt;
      &lt;ItemTemplate&gt;
        &lt;tr&gt;
          &lt;td style="vertical-align: top; font-weight: bold;"&gt;
            &lt;asp:Label ID="lblPAQID" runat="server" Text='&lt;%#Eval("ThisPAQID") %&gt;' Visible="false" /&gt;
            &lt;asp:Label ID="lblPAQVersion" runat="server" Text='&lt;%#Eval("PAQVersion") %&gt;' Visible="false" /&gt;
            &lt;asp:Label ID="lblQuestionID" runat="server" Text='&lt;%#Eval("QuestionID")%&gt;' /&gt;
          &lt;/td&gt;
          &lt;td style="vertical-align: top;"&gt;
            &lt;asp:Label ID="lblQuestionText" runat="server" Text='&lt;%#Eval("Question")%&gt;' /&gt;
          &lt;/td&gt;
          &lt;td style="vertical-align: top;"&gt;
            &lt;asp:TextBox ID="txtAnswer" runat="server" Class="PAQAnswer" Text='&lt;%#Eval("Answer")%&gt;' /&gt;
              &lt;script type="text/javascript"&gt;   **THIS SCRIPT IS NOT FIRING**
              var textBox = document.getElementById("txtAnswer");
              if (document.attachEvent) {
                document.attachEvent("onblur", textBox, function() {
                  SaveAnswer('&lt;%#Eval("ThisPAQID")%&gt;', '&lt;%#Eval("QuestionID")%&gt;',     window.event.target.value);
                });
              } else {
                document.addEventListener("blur", textBox, function() {
                  SaveAnswer('&lt;%#Eval("ThisPAQID")%&gt;', '&lt;%#Eval("QuestionID")%&gt;', this.value);
                }, false);
              }   
            &lt;/script&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
  &lt;/ItemTemplate&gt;
&lt;/asp:ListView&gt;
</code></pre>

<p>The generated code looks like this:</p>

<pre><code>&lt;input name="lstQuestions$ctrl0$lstAnswers$ctrl0$txtAnswer" type="text" value="2.0" maxlength="3" id="lstQuestions_ctrl0_lstAnswers_ctrl0_txtAnswer" Class="PAQAnswer" style="width:30px;" /&gt;

&lt;script type="text/javascript"&gt;
  var textBox = document.getElementById("txtAnswer");
  if (document.attachEvent) {
    document.attachEvent("onblur", textBox, function() {
      SaveAnswer('13242', '1', window.event.target.value);
    });
  } else {
    document.addEventListener("blur", textBox, function() {
      SaveAnswer('13242', '1', this.value);
    }, false);
  }   
&lt;/script&gt;
</code></pre>

<p>The embedded values in the SaveAnswer calls are correct; however, I don't know how to tie the input statement to the JavaScript. Probably amazingly simple, but I don't see it... yet.</p>
