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

Text Box Prompt

Started by Prakash Bhai, 19 Aug 2010 07:27:03 AM

Previous topic - Next topic

Prakash Bhai

Hi Everyone,

I am working on Text box prompt in a report page. I am using Java Script<HTML ITEM> based on user requirement. When I run the report, Initially Text box has to be empty and alert msg should be :pls enter number". And When I enter a value which is more than 6 digits,It has to throw an err msg saying" you have crossed the limit size".

How to implement this functionality using HTML ,If there is any other alternative that would be great.

Please respond ASAP



Sreeni P

Quote from: Abhi Ram on 19 Aug 2010 07:27:03 AM
Hi Everyone,

I am working on Text box prompt in a report page. I am using Java Script<HTML ITEM> based on user requirement. When I run the report, Initially Text box has to be empty and alert msg should be :pls enter number". And When I enter a value which is more than 6 digits,It has to throw an err msg saying" you have crossed the limit size".

How to implement this functionality using HTML ,If there is any other alternative that would be great.

Please respond ASAP




Hi U can try this
<script>
var fW=(typeof getFormWarpRequest == "function" ?
getFormWarpRequest() :document.forms["formWarpRequest"]);
{
str=fW._textEditBox<your promptname>.value;

if (str==null||str=='')
{
alert("your text goes here.");
}
else if(str.length(str>=6))
{
alert('Your text Goes here')
}
else
alert('Your text goes here')
}
</script>


try once ....hope it will fixes ur problem

Prakash Bhai

Hi Srinivas,
Thanks for the help. What I did from my side is, In the main report page, I took a text box prompt with Parameter1 as name. And in the Miscellaneous(Properties Pane) I named the text box name as Parameter1.
And next to text box prompt, I have pulled HTML item and  in the Description(Properties Pane) I have named it as function. And In HTML I just wrote this code

<script>
var fW=(typeof getFormWarpRequest == "function" ?
getFormWarpRequest() :document.forms["formWarpRequest"]);
{
str=fW._textEditBoxParameter1.value;

if (str==null||str=='')
{
alert("your text goes here.");
}
else if(str.length(str>=6))
{
alert('Your text Goes here');
}
else
alert('Your text goes here');
}
</script>

But I found some errors when I executed the report. Can u pls tell me where I went wrong.