Change offsetY via Javascript?

4 posts, 0 answers
  1. radBrad
    radBrad avatar
    29 posts
    Member since:
    Mar 2008

    Posted 21 Apr 2008 Link to this post

    How can I change the offsetY in the OnClientShow or the OnClientBeforeShow Javascript Event?

  2. radBrad
    radBrad avatar
    29 posts
    Member since:
    Mar 2008

    Posted 21 Apr 2008 Link to this post

    Another thing could help....

    is there a way to get the client ID of the TargetControlID in the OnClientShow or the OnClientBeforeShow Javascript Event?

  3. radBrad
    radBrad avatar
    29 posts
    Member since:
    Mar 2008

    Posted 21 Apr 2008 Link to this post

    nevermind, I figured out both of these.
    sender.get_offsetY(int) 
    sender.set_offsetY(int)


    and

    var targetControll = $get(sender.get_targetControlID());

    However, I still can't figure out how to change the style.top of the sender?
    The following doesn't seem to work.
            var tooltip = $get(sender.get_id());     
             tooltip.style.position = 'absolute';
             tooltip.style.top = '100px';        
             tooltip.style.left = 0;



    Please help, the tooltip isn't displaying in the correct position in dotnetnuke if there is any scroll. I can fix the scroll offset, but i have to be able to set the top position of the tooltip.
  4. Ubong
    Admin
    Ubong avatar
    328 posts

    Posted 24 Apr 2008 Link to this post


    Hello Brad,

    There are two possible solutions for this:
    1. On the Server, you set 

        rdtltip.RelativeTo = Telerik.Web.UI.ToolTipRelativeDisplay.BrowserWindow;  
              rdtltip.Position= Telerik.Web.UI.ToolTipPosition.TopLeft; 

      and then on the client you set :

      sender.set_offsetX(200);   
       
       
       
      sender.set_offsetY(200);  
       
       
       

       

       

    2.  For the the other solution entirely ClientSide, you set the following :

        function Show1(sender,args)  
        {  
            sender.set_relativeTo(2);  
            sender.set_position(11);  
            sender.set_offsetX(200);     
            sender.set_offsetY(200);  
        }  
         


      Kind regards,
      Ubong
      the Telerik team


      Instantly find answers to your questions at the new Telerik Support Center
    Back to Top