さまざまな値のプロンプトを表示する作成した HTML ボタンがいくつかあり、その右側に送信ボタンがあります。最初の数回はすべてがうまく機能します。しかし、送信ボタンを 3 回押すたびに、すべてが白くなり、レポートが再読み込みされ、値のプロンプトがレポートの一番下に移動します。JavaScript を使用する他のレポートがあり、送信ボタンを一定回数押すと、レポートが白いリロードになり、動作しません。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;
}
}