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

tool tip for a Prompt

Started by TheDarkKnight, 01 Sep 2010 04:03:17 AM

Previous topic - Next topic

TheDarkKnight

Hello Pals,
My requirement is to show tooltip when we have a mouse over a value prompt. For eg...i have a value prompt for Status. when a user does a mouse over the prompt, it should show tooltip like 'Choose ordered status......'

i cud able to tooltip for a text using <a title> and </ a> tags in a prompt page.
but doesnot able to tooltip for the prompt itself using these tags.

Appreciate any sort of help!

If above detailsa are not clear, then pls letme know.

Cheers
TDK


technomorph

#1
Hi,

Assuming you're using a standard drop down value prompt. This should work:

Create a <DIV> tag around the value prompt using two HTML Items:

<div id="VP_myPrompt">

</div>



Then add another HTML Item and include the following:


<script type="text/javascript">

   var oContainer = document.getElementById("VP_myPrompt");
   var oPrompt= oContainer.getElementsByTagName("select");
   oPrompt[0].title = "My value prompt tool tip message.";

</script>


Cheers

TheDarkKnight

Thx technomorph!!..This helps.

i use list box for the value prompt. Got the code for it and it works now

Create a <DIV> tag around the value prompt using two HTML Items:

<div id="ORD">

</div>

Put another HTML Item
<script>
{

   var get_myList = document.getElementById("ORD");
   if (get_myList != null)
   {
      var target_list = get_myList.getElementsByTagName("SELECT")[0];
      if (target_list != null)
      {
         var arr_items = target_list.getElementsByTagName("OPTION");
         for ( var i = 0; i < arr_items.length; i ++ )
         {
            arr_items.title = "Choose status based on Order's status";
         }
      
      }
   }
}
</script>


Thx Again!!

technomorph

Happy to help. This is useful.

Just an observation (and admittedly being a bit pedantic :)), but I reckon the code could be simplified a little. Perhaps to something like the following:

   var get_myList = document.getElementById("ORD");
   var target_list = get_myList.getElementsByTagName("SELECT")[0];
   var arr_items = target_list.getElementsByTagName("OPTION");
   arr_items.title = "Choose status based on Order's status";

If the tags have definitely been defined, I'm not sure if there's much value in checking that the objects have been referenced i.e. the 'if (get_myList != null)...' and 'if (target_list != null)...' lines are probably not needed.  Also, unless there is a typo, it doesn't look like the loop is doing anything.

Cheers




TheDarkKnight

Yes....u got it right.

My report had to display the loop numbers also....missed that bit in the code..Sorry for that  :).

Thx!