COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: STLAURENT on 08 Feb 2008 02:53:04 PM

Title: I would like a copy/paste button for prompt
Post by: STLAURENT on 08 Feb 2008 02:53:04 PM
In my prompt page, i would like a button for copy/paste a value, prompt1 -> prompt2

I create a button in my prompt page with Java code i don't have a code for copy prompt

Thank you !!! ;)

Example :

Prompt1 (Date) : 2008-02-01                 Copy Button -->            Prompt2 (Date) : 2008-02-01

Java Code I have :

<HTML>
<BODY>
<script language="javascript" type="text/javascript">

function copy_clip(txt)
{
}

</script>
<input type = "button" value = "-->" onclick = "copy_clip(document.getElementById('txt').value)" >
</BODY>
</HTML>
Title: Re: I would like a copy/paste button for prompt
Post by: sandhya on 12 Feb 2008 06:05:23 AM
If ur prompt page contains textbox prompts then u can use the following javascript.U must set the name property of the two textbox prompts as PDate and PDate1 respectively

<input type=button value="-->" OnClick=copy_clip();></input>
<script>
function copy_clip()
{
var val=document.formWarpRequest._textEditBoxPDate.value;
document.formWarpRequest._textEditBoxPDate1.value=val;
}
</script>