This is a migrated thread and some comments may be shown as answers.

tooltip at x y position

2 Answers 78 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Dheeraj Ramaswamy
Top achievements
Rank 2
Dheeraj Ramaswamy asked on 07 Jul 2009, 12:31 AM
Hi,

 I have been trying to search this on the forum but couldnt find any. I have a simple requirement of dynamically showing (from client side) at the x y position of the mouse. The difference between some example shown at the site is that it always has targetcontrolid but the element i clicked does not have any id.... Its a html anchor element and an example is shown below

<a href="javascript:showComments(1);">Comment1</a>

So far i have been able to determine the x y position of the mouse but wanted to see if there is any tooltip.showAt function which will position the tooltip at the specified x,y co-ordinates?

Pretty sure this has been answered somewhere but couldnt find it

 

2 Answers, 1 is accepted

Sort by
0
Accepted
Svetlina Anati
Telerik team
answered on 09 Jul 2009, 02:21 PM
Hi Dheeraj,

I suggest to hook up the OnClientShow event, to obtain a reference to teh tooltip there and to change its top and left settings as shown below:

     <script type="text/javascript">  
          
        function OnClientShow(sender, args)  
        {  
           var popupelement = sender.get_popupElement();  
           popupelement.style.top = "500px";  
           popupelement.style.left = "500px";             
        }  
          
        </script> 




Best wishes,
Svetlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
TIGER
Top achievements
Rank 1
answered on 09 Sep 2011, 02:46 AM
I tried this and it did not work as expected. Seemed the tooltip had already been shown at previouse position and changing style.top would not affect it. The onclientbeforeshow event seemed early to accept any position adjustment. Setting a html element for position anchor might be a solution.
Tags
ToolTip
Asked by
Dheeraj Ramaswamy
Top achievements
Rank 2
Answers by
Svetlina Anati
Telerik team
TIGER
Top achievements
Rank 1
Share this question
or