I have a subpage created and a button that shows it. But, on that button click I want to manipulate two objects - show subpage and hide text. Is there a way to do that in JavaScript? If so, how do I reference these objects (at least the subpage has a name, but my text doesn't)?
Thanks!
--
You received this message because you are subscribed to the Google Groups "CommandFusion Software" group.
To unsubscribe from this group and stop receiving emails from it, send an email to commandfusio...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I can't tell if you are new to JS but good for you for at least attempting it. The JS engine that CF uses is the one supplied in the iPad. I think it is ECMA 3. The allowed JS functions are whatever JS allows. I think you may be wanting to know what are the CF. functions.
Those are well documented in the scripting reference document at http://www.commandfusion.com/docs/scripting/ and in the CommandFusion.wiki at http://www.commandfusion.com/wiki2/.
I suggest you use the scripting reference to see how to include JS modules, into CF using the script manager. As my father used to tell me (constantly) :
Every man (woman) has the wit to know and the will to learn, but the key to knowledge is the open book. or in this case the open Web page.
The CF functions are merely an object in the JS namespace provided by CF, and all of the "CF functions" are functions in the name space. When you build JS modules it is IMHO a good idea to follow the CF lead and build all your FS modules as objects with some simple name (I use 2 to 3 capital letters) The advantage of this is that you can reuse names in the various JS objects. e.g. each object (module) can then have a function called initialize with no naming conflicts. Naturally the addressing must include the name of the object as in MY.initialize(). or AB.initialize(). The name of the module can be anything you want, it is used by the script manager to desigane what modules to load at run time.
A single module can have many objects but I generally place one main object in each module as an all encompassing object with objects needed by the module as objects in the encompassing object. Buttons then can make calls such as MY.action(button_join_, another Parameter, another parameter, . . . ). I find this more convenient than putting complex JS snippets on a button. Also it allows me to syntax check more complex JS snippets before they are used.
Hope that helps.
--
--