Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Help with CopperCube
ccbSetCopperCubeVariable and ccbGetCopperCubeVariable allows you to create a set a global variable, how to create a global func?

bracer
Registered User
Quote
2019-09-11 21:29:09

Inside the "Execute JavaScript" action, I can use ccbSetCopperCubeVariable and ccbGetCopperCubeVariable to create global root variables, that is GREAT !

But creating a function inside the "Execute JavaScript" action does not make that function "callable" from other "Execute JavaScript" actions, it will simply say function xxx is not defined.

How do you make a global function in Coppercube ?


chenhongye
Registered User
Quote
2019-09-12 04:28:33

Try window.fun=function(){console.log(123)}


bracer
Registered User
Quote
2019-09-13 03:11:14

That is an absolutely INGENIOUS way !
Access the DOM directly !
That is so cool !
Wait...I might as well use this method to create variables instead of using ccbSetCopperCubeVariable which only holds strings and numbers !!!!

This is INGENIOUS !


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Inter?ational" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact