Link to home
Start Free TrialLog in
Avatar of Janith Ariyathilake
Janith AriyathilakeFlag for Sri Lanka

asked on

"send_test_btn" and "more_variables4test" are ids of submit button("send_test_btn") and a text box("more_variables4test"). Could you explain above code clearly?

hi,

1. "send_test_btn" and "more_variables4test" are ids of submit button("send_test_btn") and a text box("more_variables4test"). Could you explain below code clearly?

var TF={};
TF.init=function(){
  TF.init_send_test_btn();  
  TF.init_more_variables4test();
};

ASKER CERTIFIED SOLUTION
Avatar of Michel Plungjan
Michel Plungjan
Flag of Denmark image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Anwar Saiah
Anwar Saiah

Although the code here is not really complete in any way or sense, but the main idea seems clear enough, TF is an object that conducts tests on some variables that are provided by a text box (more_variables4test), those variables are sent by clicking the submit button, so to get things going an event handler is triggered to wait for the submit button to be clicked and when it is the variables testing is initiated. It seems that the scenario given would support of entering new variables after getting first ones on the go. I think that would be the main logic behind the things.
Avatar of Janith Ariyathilake

ASKER

Could you more explain below mentioned comment which is included "line 2" in first comment ?

TF.init = function() {           // an anonymous function is assigned to a member called init
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
In,  
TF.init        1.  "init" is a inbuilt function in javascript?

2. If answer is yes then what is the purpose if init function in javascript?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial