You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Calling javascript funtion within the same javascript file

edited Jul 9, 2021 11:05AM in Visual Builder 4 comments

Summary

Calling javascript funtion within the same javascript file

Content

Hello,

I would like to know how to call a javascript funtion with in another javascript function within the same javascript file.

Please code below but its not working. 

Thanks,

 

define([], function() {
  'use strict';
 
  var PageModule = function PageModule(check) {};
 
  /**
   *
   * @param{String} arg1
   * @return{String}
   */
  PageModule.prototype.getResult = function (arg1) {
   /*alert('****');*/
   /*var x = setTimeout(1000);*/
   /*alert(x);*/
 
   var x = setInterval(300);
   
   if(1 == PageModule.prototype.check.getResult){
     return 1;
   }
  
   return x;
 
  };
 
  /**
   *
   * @param{String} arg1
   * @return{String}
   */
  PageModule.prototype.check = function (arg1) {
    return 1;
  };

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!