How i can html of tooltip in javascript function

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    How i can html of tooltip in javascript function

    Hi!
    I want to change my Tooltip Html in Javascript like. (I don't want using [AjaxMethod] in here)
        fucntion changeHTML()
                  {
                         var tooltip= Tooltip1;
                         tooltip.setTitle('New title');
                         tooltip.setHtml('New html'); // ???????
                  }
    I search in Ext API: http://www.extjs.com/deploy/dev/docs/ but I didn't find any function...
    Can you give me a solution
    Thank!

  2. #2

    RE: How i can html of tooltip in javascript function

    I had the same issue. How you set it depends on what has happened with the tooltip. If the tooltip has not yet been rendered to screen you can just set the html. If it has been rendered to screen, you have to set the body:

    var sHtml = 'All'; 
    
    // set the value of the textbox to All
    #{txtFilter}.setValue(sHtml);    
    
    
    // set the tooltip that is attached to the textbox
    
    // sets it if it has not been rendered
    #{txtFilterToolTip}.html=sHtml;    
    
    // tooltip has been rendered set the container html 
    if (#{txtFilterToolTip}.body) { #{txtFilterToolTip}.body.update(sHtml);}

Similar Threads

  1. Replies: 6
    Last Post: Mar 09, 2013, 4:58 AM
  2. Calling JavaScript function
    By UserClarion in forum 1.x Help
    Replies: 2
    Last Post: Dec 30, 2011, 10:23 AM
  3. Replies: 1
    Last Post: Nov 24, 2011, 6:13 PM
  4. tooltip html
    By [WP]joju in forum 1.x Help
    Replies: 1
    Last Post: Oct 02, 2009, 3:58 AM
  5. [FIXED] [V0.8] Update Html ToolTip
    By methode in forum Bugs
    Replies: 4
    Last Post: Apr 28, 2009, 3:42 PM

Posting Permissions