Thank you for supporting the Cloud Customer Connect Community in 2024. It's a gift to work with you!

Look back
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

Import Javascript Libraries is not working

edited Oct 13, 2018 12:30PM in Visual Builder 2 comments

Content

Hi,

We followed the steps in https://blogs.oracle.com/vbcs/importing-and-using-javascript-libraries-in-your-visual-builder-custom-code

Therefore, I wrote below for my gl-matrix.js in resources folder:
-------------------------------------------------------------------------------------------------------
define(["mobileApps/mytraceapp/resources/gl-matrix"], function(glmatrix) {
  'use strict';
 
  var PageModule = function PageModule() {
  
 PageModule.prototype.createVec3 = function(){
   var myVec3= glmatrix.vec3.create();
   glmatrix.vec3.set(myVec3,0,0,2.0);
   alert("come in");
   return myVec3;
 }; }; 
  return PageModule;
});

-------------------------------------------------------------------------------------------------------

But in the action for button click, I call the createVec3 module, but there was no response when I click the button. It should had an alert("come in"); if it called the function successfully

Howdy, Stranger!

Log In

To view full details, sign in.

Register

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