www.webdeveloper.com
Results 1 to 3 of 3

Thread: this js function throwing error

  1. #1
    Join Date
    Nov 2004
    Location
    xxxyyy
    Posts
    357

    this js function throwing error

    want to remove a row from a table .

    this js function throwing error



    function removeRowFromTable(var c)
    {
    //var tbl = document.getElementById('tblSample');
    // var lastRow = tbl.rows.length;
    //if (lastRow > 2) tbl.deleteRow(lastRow - 1);
    c.parentElement.removeChild(c);

    }


    I'm sending "this" from thr <TR> to call this JS function

  2. #2
    Join Date
    Dec 2003
    Location
    Bucharest, ROMANIA
    Posts
    15,428
    What you want to do? Tell us in words and show us the HTML code, please.

  3. #3
    Join Date
    Jul 2008
    Location
    urbana, il
    Posts
    2,787
    Code:
    function removeRowFromTable(var c){
    syntax error, no var as arguments...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles