开发者

Asp.net jquery and alert with click anywhere on page

I have an asp.net 4.0 page with a listbox, textbox and a ajax tabcontainer. On one of the tabs of the tab container there is a usercontrol. When I enter “edit mode” (by the user clicking an asp:button cal开发者_StackOverflowled Edit) in the usercontrol on that tab, I would like to display an alert when the user tries to click or nav by tabbing anywhere outside of that user control. E.g. “You must save your changes first…”

Is there a way with jquery that I could setup just one function that say traps the click on another tab or any control outside of that usercontrol?

I have my usercontrol so it can send an event to the parent when it enters “edit mode”.

Oh yeah, I also have update panels in the mix.


You can use this: http://api.jquery.com/blur/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜