I have couple value prompts and couple text prompts in prompt page. I need to add RESET button to the prompt page.
Ex: if I select some thing in value prompt and text prompt when I click on RESET button prompt values shoud be clear in value prompt and text prompt.
using some java script I was able to clear only the value prompt values not the the text prompt values. below is the script. Please any one can help me how to achive this??
<button style=""
onclick="preventSubmitEvent(event); resetPrompts();"
onkeypress="if (event.keyCode==13){event.keyCode=0;} return true;"
onkeyup="if (event.keyCode==13){event.keyCode=0; onclick();} return true;"
> Reset </button>
<script>
/*var intNum = setInterval("testLoad();",250);
function testLoad()
{
if (document.readyState=="complete")
{
clearInterval(intNum);
startUp();
}
}
function startUp()
{
document.formWarpRequest._oLstChoicesREGION.onchange=function(){objChange(this);};
document.formWarpRequest._oLstChoicesLOCATION.onchange=function(){objChange(this);};
document.formWarpRequest._oLstChoicesLQA.onchange=function(){objChange(this);};
document.formWarpRequest._oLstChoicesUQA.onchange=function(){objChange(this);};
document.formWarpRequest._oLstChoicesLDA.onchange=function(){objChange(this);};
document.formWarpRequest._oLstChoicesUDA.onchange=function(){objChange(this);};
}*/
function resetPrompts()
{
document.formWarpRequest._oLstChoicesREGION.selectedIndex=-1;
document.formWarpRequest._oLstChoicesLOCATION.selectedIndex=-1;
document.formWarpRequest._oLstChoicesLQA.selectedIndex=-1;
document.formWarpRequest._oLstChoicesUQA.selectedIndex=-1;
document.formWarpRequest._oLstChoicesLDA.selectedIndex=-1;
document.formWarpRequest._oLstChoicesUDA.selectedIndex=-1;
}
</script>
Although people don't generally seem interested in non-Java Script approaches when asking a Java Script question....
I would consider putting a drill through to the same report on the prompt page. If your prompt page renders quickly (as it should) then this just re-loads the report -- effectively setting all prompts back to their original state.