Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-10-2019 01:27 PM
I want to call a function from a function in Script
funct_name_1: function(){
// Here i want to call funct_name_2
return ;
},
funct_name_2: function(){
........
........
return ;
}
Solved! Go to Solution.
Labels:
- Labels:
-
Team Development
1 ACCEPTED SOLUTION
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-10-2019 01:43 PM
this keyword is very important.
funct_name_1: function(){
// Here i want to call funct_name_2
this.funct_name_2(object);//you can even pass parameters
return ;
},
funct_name_2: function(){
........
........
return ;
}
6 REPLIES 6

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-10-2019 01:28 PM
this.func_name_2();
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-10-2019 01:29 PM
how about this??
funct_name_1: function(){
funct_name_2();
return ;
},
funct_name_2: function(){
........
........
return ;
}
Please mark my response as correct and helpful if it helped solved your question.
-Thanks
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-10-2019 01:32 PM
if i want to pass object to function 2
will this work ?
funct_name_1: function(){
funct_name_2(object);
return ;
},
funct_name_2: function(object){
........
........
return ;
}
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-10-2019 01:43 PM
Ideally it should.
Give it a shot and see
Please mark my response as correct and helpful if it helped solved your question.
-Thanks