Note that there are some explanatory texts on larger screens.

plurals
  1. PORetrieving added jquery rows
    primarykey
    data
    text
    <p>I have a problem retrieving all the data inside the rows added by the user. I tried using my variable <code>reclist</code> to retrieve the records but it give me blanks.</p> <p>The source code is as follows:</p> <pre><code>&lt;script type="text/javascript"&gt; $(document).ready(function(){ $('#btnAdd').live('click',function(){ var name = $('#txtName').val(); var name2 = $('#txtName2').val(); $("#tbNames tr:last").after("&lt;tr&gt;&lt;td&gt;" + name + "&lt;/td&gt;&lt;td&gt;" + name2 + "&lt;/td&gt;&lt;td&gt;&lt;img src='delete.gif' class='delete' height='15' /&gt;&lt;/td&gt;&lt;/tr&gt;"); }); $('#tbNames td img.delete').live('click',function(){ $(this).parent().parent().remove(); }); }); &lt;/script&gt; &lt;input id="txtName" type="text" /&gt; &lt;input id="txtName2" type="text" /&gt; &lt;input id="btnAdd" type="button" value="Add" /&gt; &lt;table id="tbNames" &gt; &lt;tr&gt; &lt;td&gt;&lt;b&gt;Name&lt;/b&gt;&lt;/td&gt; &lt;td&gt;&lt;b&gt;Name2&lt;/b&gt;&lt;/td&gt; &lt;td&gt;&lt;b&gt;Delete&lt;/b&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Bingo&lt;/td&gt; &lt;td&gt;Tingo&lt;/td&gt; &lt;td&gt;&lt;img src="Delete.gif" height="15" class="delete" /&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;script type="text/javascript"&gt; $(document).ready(function() { $("#submit_app").button(); $("#submit_app").click(function() { var reclist = $("#txtName").val(); console.log(reclist); }); }); &lt;/script&gt; &lt;input id="submit_app" type="button" style="height: 35px; width: 225px" value="Add New User" /&gt; </code></pre> <p>Please advise if I have miss any coding.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload