Hello,
i would display dynamically first item in a value prompt and to reflect that item.
I used following java script :
<script language="JavaScript">
function setDefaultValue()
{
var fW = (typeof getFormWarpRequest == "function" ? getFormWarpRequest() : document.forms["formWarpRequest"]);
if (fW)
{
fW._oLstChoicesPrompt1.options[0].text = 'Bikes';
fW._oLstChoicesPrompt1.focus();
fW._oLstChoicesPrompt1.blur();
}
}
setTimeout("setDefaultValue()", 10);
</script>
With this i am able to display the value in the prompt as indicated in the script
but are unable to view the filtered data for that value.
Can you help me?
Hi,
There is nobody that can answer to me ?
Hi,
If the datas that should be filtered are linked to the value-prompt like a "cascading source", you should try in your javascript a code to do a "reprompt" of the page after you put the value in the value-prompt.
I don't have the code here for the moment (and I don't remember correctly, maybe it's like "setPromptAction(...)"), but I think you can find it.
Thanks
Hi,
Try something like:
setPromptControl('reprompt');
Hi,
Should I put a button prompt?
Hi,
No, I didn't mean that.
I'm nearly sure that it's possible to call the same behaviour as a reprompt button with something like:
"javascript:setPromptControl('reprompt');"
in a code.
I can't really test again, as one of my PC used for personnal testing has "crashed down", and I'm in a real nightmare now...
Hi
I proved to add
setPromptControl('reprompt'); after
setTimeout("setDefaultValue()", 10); statement
and give me these errors:
Error: Object Expected
Error: Unable to move the focus to control because no visible, enabled or of a type that can not be made active.