In my UX I have about a dozen frames. I ultimately want one button to expand/collapse all of them simultaneously. I examined one of the frames in the debugger and it uses this JS...
Here is the adapted code I came up with. It doesn't quite work right (the frame doesn't expand and the CSS is lost). What am I doing wrong??
Code:
if($('HOME_HOSPICE_CL_FSJE.SHOWHIDEPANELDIV.FRAME_INSURANCE.R1').style.display=='none') { $('HOME_HOSPICE_CL_FSJE.SHOWHIDEPANELDIV.FRAME_INSURANCE.R1').style.display=''; $('HOME_HOSPICE_CL_FSJE.SHOWHIDEPANELIMG.FRAME_INSURANCE.R1').src = 'css/MobGray/Collapse.png'; this.className = 'MobGrayAccordionButtonSelected'; HOME_HOSPICE_CL_FSJE_DlgObj._showHideFrame('FRAME_INSURANCE','show'); } else { $('HOME_HOSPICE_CL_FSJE.SHOWHIDEPANELDIV.FRAME_INSURANCE.R1').style.display='none'; $('HOME_HOSPICE_CL_FSJE.SHOWHIDEPANELIMG.FRAME_INSURANCE.R1').src = 'css/MobGray/Expand.png'; this.className = 'MobGrayAccordionButton'; HOME_HOSPICE_CL_FSJE_DlgObj._showHideFrame('FRAME_INSURANCE','hide'); } return false;
Code:
var frame = {dialog.object}.getPointer('FRAME_INSURANCE'); if(frame.style.display=='none') { frame.style.display=''; frame.src = 'css/MobGray/Collapse.png'; frame.className = 'MobGrayAccordionButtonSelected'; {dialog.object}._showHideFrame('FRAME_INSURANCE','show'); } else { frame.style.display='none'; frame.src = 'css/MobGray/Expand.png'; frame.className = 'MobGrayAccordionButton'; {dialog.object}._showHideFrame('FRAME_INSURANCE','hide'); } return false;
Comment