hi all
the following script is used in 8.2 for the same. Please kindly help me out ,how to convert this script in 8.4 for the same function.?
JS logic in 8.2
<script language="javascript">
document.forms["FormWarpRequest"].elements["_oLstChoicesX"].remove(0);
document.forms["FormWarpRequest"].elements["_oLstChoicesX"].remove(0);
</script>
Thanks in advance
Try
<script language="javascript">
getFormWarpRequest()._oLstChoicespromptname.remove(0);
getFormWarpRequest()._oLstChoicespromptname.remove(0);
</script>
I have tryed the following solution in 8.4 FP1, but i got a JS error showing that "the list is null or not an object".
I put an html item in my prompt page with this :
<script language="javascript">
getFormWarpRequest()._oLstChoicesPeriode.remove(0);
getFormWarpRequest()._oLstChoicesPeriode.remove(0);
</script>
My prompt name is of course Periode.
Is there something i'm doing wrong ?
Try the following code.
<script language="javascript">
var fW = (typeof getFormWarpRequest == "function" ? getFormWarpRequest() : document.forms["formWarpRequest"]);
fW._oLstChoicesPeriode.remove(0);
fW._oLstChoicesPeriode.remove(0);
</script>
hi Gopinath
the script which u have sent for the first time is not worked .
<script language="javascript">
var f = getFormWarpRequest();
var list = f._oLstChoicesCUNT;
list.remove(1);
list.remove(0);
list.removeAttribute("hasLabel");
</script>
CUNT is the prompt name.
this script is working fine.
Thanks
Hi,
Instead of deleting the 2 firsts rows, i have done this trick wich works too...
I have put a first html item before the prompt wich contain : <span id="Period">
I have put a second html item right after the prompt wich contain : </span><script>
document.getElementById('Period').style.display = 'none'; //hide </script>
After the finish button there is another html item :
<script>
var mySpan = document.getElementById("Period");
var myInput = mySpan.getElementsByTagName("select");
myInput[0].selectedIndex = 2
</script>
In fact, i have a hidden prompt wich have a cascading source. It have always only 1 option in it and this is why i have selected the first item in it (index = 2).
Thank you for your help, i know my solution is not for the same problem, but i tryed with your solution without success.