I am trying to display a panel without going back to the server to do it. (If this isn't the best way, please advise). The panel only consists of a vertical list of command buttons.
The code is:
Can someone inform me as to how to do this correctly, either a better way to show a panel or how to set the "display" property of a panel on the client side.
The code is:
Code:
function funMainMenuClick(obj) {
var sPanel = '';
switch (obj.name) {
case 'btnMaintenance':
sPanel = 'panMaintenance';
break;
// add more case statements...
default:
alert('This function is not available yet.')
break;
}
alert('Panel Name: ' + sPanel); // debug...
var oPanel = window.document.getElementById(sPanel);
// The error occurs in the above statement.
// Object required.
alert('Panel is: ' + oPanel.name); // debug...
//oPanel.style.display=('block');
// I'm trying to get to this statement to display the panel.
}
Can someone inform me as to how to do this correctly, either a better way to show a panel or how to set the "display" property of a panel on the client side.