I've read all the other info about adding a row to a table and I just can't
get it to work.  I've got my dialog popping up with  two buttons.  When the
user clicks Volunteer, I want an empty row to appear at the bottom of my
table and the "Volunteer" button to change to "Save".  The user would enter
their info and press save.  The data is then saved to the db. I've tried
tableEditor, but can't even get a javascript error to troubleshoot.  Can
someone help?  I promise to write this up in the FAQ later....here's code to
call the popup:

[code]
var Demo = {
   three: function() {
   var url = 'v_concessions.php?i='   "5";
   $('<iframe id="popup" src="'   url   '" />').addClass("flora").dialog(
    {
        title: "St. Mary Ryken",modal: true,overlay:
       {
             opacity: 0.5,
             background: "grey"
       },
        width: 850,
         height: 400,
         buttons:
         {
                'Volunteer': function() {
                      onclick=add()},
                'Cancel': function() {
 $(this).dialog('destroy')}
          }
    });
}
[/code]

Here's my add function:
[code]
function add(){
      alert("clicked add");
      var options = {
             CLASS: 'newRow',
             VALUES: {
                     email: '[EMAIL PROTECTED]',
                      lastname: '',
                      firstname: '',
                      homephone: ''
              }
      };

          jQuery.tableEditor.lib.appendRow(options);}
[/code]


-- 
View this message in context: 
http://www.nabble.com/add-new-row-to-table-tp18174322s27240p18174322.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.

Reply via email to