Hide/Show ajax cloud BalloonPopupExtender

2019-08-17 05:03发布

I'm using the BalloonPopupExtender on a text box in order to say : "Unknown input" because its the only one that allows me to have a panel in which i can insert whatever controls i want.

i want from a button push to show it and from a text change in the textbox to hide it. i noticed there is no visibility property for BalloonPopupExtender, only the DisplayOnFocus, DisplayOnClick.... properties. but no way to control it from another button or function.

how can i hide/show the BalloonPopupExtender?

2条回答
我只想做你的唯一
2楼-- · 2019-08-17 05:18

Ok i found the answer:

in the javascript i wrote :

var ctrl = $find('PopupCnt'); 

event.cancelBubble = true;

    if (ctrl._popupVisible == true) 
        ctrl.hidePopup(); 
    else 
        ctrl.showPopup();  

the 'event.cancelBubble = true' row did the thing.

and another thing - i was pushing a button that caused a postback so even if the popup showed it would reset when the new page is up so it looked like it didn't work. i just created a button with no postback and it worked.

查看更多
老娘就宠你
3楼-- · 2019-08-17 05:43

Try using the below event handler call

onmouseout="this.BalloonPopupControlBehavior.hidePopup();"
查看更多
登录 后发表回答