I'm a Cognos Developer and I'm having a trouble about "Date Prompts". I have a "Date Prompt" with the option "Edit box" selected in the "Select UI" and I want when the user change the chosen date an "onchange" event fires. Now I'm using JavaScript functions but I'm not getting do this... and just the "onchange" event don't work. I tested with another events like "onclick" and them work. My code:
<script>
var fW = (typeof getFormWarpRequest == "function" ?getFormWarpRequest() : document.forms["formWarpRequest"]);
if ( !fW || fW == undefined) {
fW = ( formWarpRequest_THIS_ ?formWarpRequest_THIS_ :
formWarpRequest_NS_ );
}
fW.txtDateCALENDARIO.onchange= function() { alert('Test'); }
</script>
In this sample I want that always the user change their choices the message "Test" is shown. Today if the user choose for example "July 29, 2013" the event is not fired, but if the user change manually on the "Edit Box" for "July 28, 2013" and click in another place, the event is fired!!!
Could anyone help me? Please?
Thanks!!
|| fW == undefinedis dead code as!undefinedand!nullaretrue(these being the only values which are== undefined). - Fabrício Matté=]On topic: you'll most likely have to show more code, see SSCCE for guidance. - Fabrício Matté