Fix the Display of ComboBoxes, ListBoxes and Radio Button/Checkbox Groups in Read Mode with Dojo


if("#{javascript:document1.isEditable()}" == "false"){
 
  dojo.query('table td table[id]').forEach(function(node) {
    var value = '';
 
    // Get the value out of all cells in the nested table and concatenate them
    dojo.query('td', node).forEach(function(innerNode) {
      value += innerNode.innerHTML + ', ';
    });
 
    // Replace the table with only the value(s) (or a blank), but cut off the trailing comma
    node.outerHTML = value.substring(0, value.length-2);
  });
}
All code submitted to OpenNTF XSnippets, whether submitted as a "Snippet" or in the body of a Comment, is provided under the Apache License Version 2.0. See Terms of Use for full details.
No comments yetLogin first to comment...