Jump to content

Javascript

From NusaATK
Revision as of 21:37, 14 November 2008 by Samk (talk | contribs) (New page: {{howto|Medium|Sam Kapilivsky}} This howto demonstrates some Javascript features that are built into ATK. == Hiding and attribute or relation depending on the value of another attrib...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

ATK Howto: Javascript

Complexity: Medium
Author: Sam Kapilivsky

List of other Howto's

This howto demonstrates some Javascript features that are built into ATK.

Hiding and attribute or relation depending on the value of another attribute

If you have an attribute that should hide or show depending on the value of another attribute, you can use the following construct:

$attr = &$this->add(new atkListAttribute(........ 
$attr->addOnChangeHandler("if (newvalue=='no') { hideAttrib('colorpickthing'); }");