Jump to content

Reference Function Inside of Function


unemployment

Recommended Posts

How can I reference a function inside of a function using OOP.

 

I am trying to do this.

 

with_field.onkeydown = function(event){
associate_search.fill_list.down_key(event);
}

 

Where in another file I have this type of setup.

function associate_search (){
     this.fill_list      =  fill_list;

     function fill_list(){
           //do stuff
           
           function down_key(event){
                  //do stuff
           }
     }
}

var associate_search	= new associate_search;

 

How can I reference the down_key function?

Link to comment
https://forums.phpfreaks.com/topic/240704-reference-function-inside-of-function/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.