Testing multiple functions by another function
-
Hello codepeople !
I have multiple functions and i forced them to give me their results.Now i will compare these function’s returns by another function.My code structer will tell my problem better then me.
Unfortunately this structure doesn’t work.
Thanks in advance.<script> jQuery(document).on( 'click', '[id*="fieldname'+'X_"]', function() MyFunction { var success = false; if (condition) { do something; success = true; } else { do something; success = false; } return success; }); </script>
<script> jQuery(document).on( 'click', '[id*="fieldname'+'X_"]', function() MySecondFunction { var success = false; if (condition) { do something; success = true; } else { do something; success = false; } return success; }); </script>
<script> jQuery(document).on( 'click', '[id*="fieldname'+'X_"]', function() testMyFunctionsAndTakeAction { if (MyFunction() == true && MySecondFunction() == false ) { do something; } }); </script>
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Testing multiple functions by another function’ is closed to new replies.