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)
Code:
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!
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:
Code:
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);}