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

Javascript for data entry validation in prompt

Started by tven77, 12 Apr 2010 09:22:08 PM

Previous topic - Next topic

tven77

Hi,
Need your help guys.  Do any of you have a sample javascript that validates the value in a prompt and after clicking the finish button, it will display an error message "value should not be blanks" if the prompt has no value?

regards,
tven

Sreeni P

<script language="javascript">
if(document.getElementById('formWarpRequestRS')._oLstChoicesXXX.options[0]==" ")
{
alert("value should not be blanks")
}
</script>


Or

<script language="javascript">
if(document.getElementById('formWarpRequestRS')._oLstChoicesXXX.value ==" ")
{
alert("value should not be blanks")
}
</script>


where XXX is the name of the prompt.

tven77

Hi,
Thanks for the reply,but where should i put the html item containing this code? Should it be beside the prompt being validated or the finish prompt button?

Thanks in advance.

Regards,
tven

Sreeni P

yeah , u can do eithr...the html item wil check in the layout whaich objects has been embided with this,
better place the HTML item after the prompt button