Page 1 of 1

ToolTip need to change in run time InnerHTML

PostPosted: 03 Sep 2014 22:47
by Peter
Hello

I would like to change dynamically the ToolTip InnerHTML in run time.

But the toolTip show only the first assigned innerHTML.

Should I do some special update or reload procedure ?

Thanks in advance, regards

Peter CH

Re: ToolTip need to change in run time InnerHTML

PostPosted: 03 Sep 2014 23:40
by Jorge Sousa
Hi

you mean change dynamically in an ajax/async event,

it could be dynamically with a full submit (event.Ajax = False), and since the page is all submited, it always doable.

Since is an ajax event, depends on javascript generation, and this plugin doesn't have a setter function (like jQueryUI or Grid has), to be able to traduce

JQToolOptions.InnerHTML:= SomeOtherHTML;

into a plugin call that would work, like $("#tooltip1").tooltip("option","innerHTML",someOtherHTML);

So, possible solutions:

1- The client API of this plugin has this method in JQToolOptions (the client api is always in the options classes)

{$IFDEF NODEF}{$REGION 'CGDevTools - Documentation'}{$ENDIF}
/// <summary>
/// The function sets permanently the “innerHtml” of all Bubble Popups
/// associated to the elements in the set of matched elements; It takes
/// an optional parameter to know if the new “innerHtml” must be saved
/// permanently or not, by default is true. Note: before using this
/// function, you must call the function .CreateBubblePopup()
/// </summary>
{$IFDEF NODEF}{$ENDREGION}{$ENDIF}
procedure SetBubblePopupInnerHtml(ASelector: string; AHTML: string; ASave: boolean = true);

2- call Tooltip1.AjaxReRender it renders locally, only the tooltip