Sunday, March 10, 2013

Show and hide Panel on load and click on checkbox





Step1: Create one .js file in root /var/www/crm/*.js
function display()
{document.getElementById(‘LBL_PANEL5′).style.display = ‘none’;}



Step2: include file in editview.php
‘includes’ =>
array (
0 =>
array (
‘file’ => *.js’,
),
),

step3: onload run file:
),
‘javascript’ => ‘<script type=”text/javascript” language=”Javascript”> onload=display(); </script>’,
),
‘panels’ =>
step4: call function on checkbox event:

‘label’ => ‘LBL_FEEDBACK_TEST_DRIVE’,
’displayParams’ =>
array (
‘field’ =>
array (
‘onChange’ => ‘display();’,
),
),

No comments:

Ad