If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Java script for date prompt, need help

Started by everlearner, 27 Nov 2013 04:01:15 AM

Previous topic - Next topic

everlearner

Hi gurus,
I have date prompt, where user can select from & to date. when i run the report, by default it is showing current date in FROM & To selection Boxes, i dont want to show the current date instead wanted to show enter date/select date. this can we do without script???
if not, can any one help me how to get it by java script.
thanks in adv

yogeswari

Hi,

Try this. 

<script>
document.formWarpRequest.elements["txtDateSBDR"].value='select an date/enter an date';
</script>

where SBDR is an prompt name and set the Select UI property=Edit box.

thanks,
yogeswari.

everlearner

Thanks for ur reply yogeshwari, i have tried what u provided,
after that in From box still it is showing current date, where as in To box it is showing the text what we provided,  i wanted to display the text in From also. how can i do this?
thanks in adv

yogeswari

Hi,

It is quite simple.  please Apply the same to "From" also.

Example:
For "From Date:" use below script
<script>
document.formWarpRequest.elements["txtDateSBDR"].value='select an date/enter an date';
</script>

where SBDR-->prompt name and set the Select UI property=Edit box.



For "To Date:" Use below script
<script>
document.formWarpRequest.elements["txtDateEBDR"].value='select an date/enter an date';
</script>

where EBDR-->prompt name and  set the Select UI property=Edit box.


Thanks,
yogeswari.