Good day.
My question is quite dumb, I guess, but I'm not familiar enough with the termins, to ask it properly (and to get an answer from Google).
So - please help...

Shortly - I'm trying to create some major class, which will be insanitated by instances, which will describe some methods, and some fields.
Major logick will be implemented in parent class.

So, lets say I have a parent

```
function CRUD_Grid_model(){

  //Settings part
  this.GridElement = "" ;
  this.editModeFlagElement = "" ;
  this.newRowElement = "";
  //Save logicks all lies here.

  this.commit = function (){
    alert("PLEASE REDEFINE COMMIT FUNCTION IN YOUR CODE");
  }
  ;
  //Settings part

  //Some more code.
}

```

And a way I'll use it

```
//Das modell
var JobberCRUD = new CRUD_Grid_model();
JobberCRUD.GridElement = $('#jobbers_dg');
JobberCRUD.editModeFlagElement = $('#jobbers_tb_edit');
JobberCRUD.newRowElement = {jobb_name:'Enter new unique name',jobb_status:'Y'};
JobberCRUD.commit = function (){
  if (this.endEditing()){
    var addrows = this.GridElement.datagrid('getChanges','inserted');
    var remrows = this.GridElement.datagrid('getChanges','deleted');
    var updrows = this.GridElement.datagrid('getChanges','updated');

    console.log(addrows);
    console.log(remrows);
    console.log(updrows);
    //Send changes?
    alert("Got total of " +addrows.length + remrows.length + updrows.length + " rows changed.");                
    //Commit changes at local level
    this.GridElement.datagrid('acceptChanges');
  }
};

```

And, what I'd like to do, is smoething like this

I want a parent.commit function to allow me to do this in child

```
JobberCRUD.commit = function (apdrows,updrows,remrows){
  //Send changes?
  alert("Got total of " +addrows.length + remrows.length + updrows.length + " rows changed.");                
};

```

So, I have no ideas what shoudl I do to achieve that. Please advice me with some tags, what it is at least :)
Thanks in advance.