0

我创建了一些 HTML 按钮,它们会显示不同的值提示,它们的右侧是一个提交按钮。前几次一切都很好。但是每次我第三次按下提交按钮时,一切都变白了,报告重新加载,我的值提示被移到了报告的底部。我有其他使用 JavaScript 的报告,并且在按下提交按钮一定次数后,报告变为白色重新加载并且 thigns 不起作用。我想知道是否有人知道为什么 Cognos 会这样做。我正在使用 10.2.1 报表工作室。任何帮助将不胜感激。

    var ftw = (typeof getFormWarpRequest == "function" ? getFormWarpRequest() : document.forms["formWarpRequest"]);
    var button = ftw._textEditBoxbuttonBox.value;

    skillGroupButtons(button);

    function skillGroupButtons(Elmt){

      var firstPrompt = ftw._oLstChoicesfirsttPrompt; 
      var secondPrompt = ftw._oLstChoicessecondPrompt; 
      var SS = ftw._oLstChoicesSSPrompt; 

      ftw._textEditBoxbuttonBox.value = Elmt;

      if (ftw._textEditBoxbuttonBox.value  == "first"){
        document.getElementById('first').style.visibility = "visible";
        document.getElementById('second').style.visibility = "hidden";
        document.getElementById('SS').style.visibility = "hidden";    
        document.getElementById('first').checked = true;

        SS.options[0].selected = true;    
        second.options[0].selected = true;

        for (var count=1;count <second.length; count++){
          second.options[count].selected= false;
         }
      } else if ( ftw._textEditBoxbuttonBox.value== "SS"){
        document.getElementById('first').style.visibility = "hidden";
        document.getElementById('SS').style.visibility = "visible";
        document.getElementById('second').style.visibility = "hidden";    
        document.getElementById('SS').checked=true;    

        first.options[0].selected=true;    
        second.options[0].selected=true;

        for (count=1;count <second.length; count++){
          second.options[count].selected= false;
        }
      } else {
        document.getElementById('first').style.visibility = "hidden";
        document.getElementById('SS').style.visibility = "hidden";
        document.getElementById('second').style.visibility = "visible";    
        document.getElementById('second').checked = true;

        first.options[0].selected = true;
        SS.options[0].selected = true;   
      }    
  }
4

0 回答 0