Search Results

Search found 1945 results on 78 pages for 'popup'.

Page 1/78 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • popup for full calendar in jquery

    - by Prasad
    I need to show a popup (balloon popup as in google calendar) while creating an event in the jquery full calendar. Any best plugins for the popup which shows as balloon and also which handles the click events (which I am using to create/edit/delete events from popup)?

    Read the article

  • Open a popup window on top of a popup window in ASP.NET

    - by demogeek
    I have a scenario where I have a popup window open and that will have links to open up another window that's going to pop open on top of the already open popup window. I've tried all sort of tricks (javascript window.open, target="_blank" etc.) but nothing seem to work. It always was opening the page on the already opened popup window. Any suggestions? Appreciated your help.

    Read the article

  • Image map popup on rollover, with popup text drawn from database

    - by lbholland
    I have a custom map of the USA with about 20 polygonal hot spots. I would like a box to pop up next to each hot spot on hover, with text and links drawn from my DB specific to the location. I would have thought this is a common situation, but I can't find a solution that works. I tried using an asp:imagemap and an ajax popup extender but you can't assign IDs to hotspots and it doesn't support mouseover events. I tried css with an html image map but I can't figure out how to use css solutions with polygonal hot spots, and I also don't know how to link it to get the data from the db without asp targets (I'm not very familiar with jquery, which would work, I am guessing). Anyone know of any simple-ish solutions out there?

    Read the article

  • Problem with Popup.StaysOpen in WPF

    - by Tola Ch.
    I got my UserControl that contain: Button Popup (contain Text block) XAML <UserControl> <button Name="btnShowPopup" Content="Button" Click="Button_Click"/> <Popup Name="popup" StaysOpen="true"> <TextBlock Text="Popup"/> </Popup> </UserControl> Code Behide private void Button_Click(object sender, System.Windows.RoutedEventArgs e) { this.popup.IsOpen=!this.popup.IsOpen; } QUESTION: I want to hide the popup, when mouse click on anywhere outside the btnShowPopup button. NOTE: I tried change StaysOpen="false" and when btnShowPopup.MouseDown event: this.popup.IsOpen=!this.popup.IsOpen; But this solution cause another problem: when btnShowPopup.MouseUp event, the Popup is disappear. Please help.

    Read the article

  • Popup Details for a Table Record

    - by shay.shmeltzer
    This one started as an OTN how-to question that seemed like something that should work automatically - turns out you need a couple of small tweaks to get it working. The idea is to have a table on a page showing multiple records, you can click any row in the table - and get a pop-up window that shows more data about that row. At first I thought I'll just need to drag the same view twice to the page - once as a table and then as a form in a pop-up. But then the Form didn't reflect the new row that got selected in the table - you'll always see the first row you selected. Adding a Partial Page Rendering between the table and the pop-up didn't do the trick either. Then I realized that the content delivery attribute of the pop-up was set to lazy, when I switched it to immediate - everything worked. Here is a little demo showing the whole development process: Note that the content delivery method attribute is also something you might want to check if you see your tables being refreshed too often when you scroll through records for example.

    Read the article

  • Clip a wpf Popup at bounds of a main window

    - by BrandonS
    From what I understand, the popup exists within it's own visual tree. However, I've noticed a few properties, Clip and ClipToBounds. What I am wanting to do is Visually clip a popup at the right and bottom edges of a window regardless of the fact that the popup is independent of the bounds of the window. I'm not using XAML, but if somebody knows how to do it in XAML, then that's fine. I can get to the main window using System.Windows.Application.Current.MainWindow. Is it possible from this to get a value that I can use to clip the popup? I'm assuming that if there is a value that I can use, then I would be able to bind the clipping of the popup to that value. This is really not necessary since after the popup initially opens, if the window gets moved or resized, the popup closes. So I would really only need to clip the popup when it opens. The reason I would like to do this is because although I am using a popup, I don't want it to appear as a popup that exists outside of the window. FYI this is for a popup calendar for a custom datebox. Any ideas, as well as clarification of misconceptions that I may have, would be greatly appreciated. Thanks, Brandon

    Read the article

  • Positioning / Scrolling problem with Flex popup.

    - by user284163
    Hi all, I'm trying to work out a specific problem I'm having with positioning in Flex using the PopUpManager. Basically I'm wanting to create a popup which will scroll with the parent container - this is necessary because the parent container is large and if the user's browser window isn't large enough (this will be the case the majority of the time) - they will have to use the scrollbar of the container to scroll down. The problem is that the popup is positioned relative to another component, and it needs to stay by that component. <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <mx:Script> <![CDATA[ import mx.core.UITextField; import mx.containers.TitleWindow; import mx.managers.PopUpManager; private function clickeroo(event:MouseEvent):void { var popup:TitleWindow = new TitleWindow(); popup.width = 250; popup.height = 300; popup.title = "Example"; var tf:UITextField = new UITextField(); tf.wordWrap = true; tf.width = popup.width - 30; tf.text = "This window stays put and doesn't scroll when the hbox is scrolled (even with using the hbox as parent in the addPopUp method), I need the popup to be local to the HBox."; popup.addChild(tf); PopUpManager.addPopUp(popup, hbox, false); PopUpManager.centerPopUp(popup); } ]]> </mx:Script> <mx:HBox width="100%" height="2000" id="hbox"> <mx:Button label="Click Me" click="clickeroo(event)"/> </mx:HBox> </mx:Application> Could anyone give me any pointers in the right direction? Thanks.

    Read the article

  • More Animation - Self Dismissing Dialogs

    - by Duncan Mills
    In my earlier articles on animation, I discussed various slide, grow and  flip transitions for items and containers.  In this article I want to discuss a fade animation and specifically the use of fades and auto-dismissal for informational dialogs.  If you use a Mac, you may be familiar with Growl as a notification system, and the nice way that messages that are informational just fade out after a few seconds. So in this blog entry I wanted to discuss how we could make an ADF popup behave in the same way. This can be an effective way of communicating information to the user without "getting in the way" with modal alerts. This of course, has been done before, but everything I've seen previously requires something like JQuery to be in the mix when we don't really need it to be.  The solution I've put together is nice and generic and will work with either <af:panelWindow> or <af:dialog> as a the child of the popup. In terms of usage it's pretty simple to use we  just need to ensure that the popup itself has clientComponent is set to true and includes the animation JavaScript (animateFadingPopup) on a popupOpened event: <af:popup id="pop1" clientComponent="true">   <af:panelWindow title="A Fading Message...">    ...  </af:panelWindow>   <af:clientListener method="animateFadingPopup" type="popupOpened"/> </af:popup>   The popup can be invoked in the normal way using showPopupBehavior or JavaScript, no special code is required there. As a further twist you can include an additional clientAttribute called preFadeDelay to define a delay before the fade itself starts (the default is 5 seconds) . To set the delay to just 2 seconds for example: <af:popup ...>   ...   <af:clientAttribute name="preFadeDelay" value="2"/>   <af:clientListener method="animateFadingPopup" type="popupOpened"/>  </af:popup> The Animation Styles  As before, we have a couple of CSS Styles which define the animation, I've put these into the skin in my case, and, as in the other articles, I've only defined the transitions for WebKit browsers (Chrome, Safari) at the moment. In this case, the fade is timed at 5 seconds in duration. .popupFadeReset {   opacity: 1; } .popupFadeAnimate {   opacity: 0;   -webkit-transition: opacity 5s ease-in-out; } As you can see here, we are achieving the fade by simply setting the CSS opacity property. The JavaScript The final part of the puzzle is, of course, the JavaScript, there are four functions, these are generic (apart from the Style names which, if you've changed above, you'll need to reflect here): The initial function invoked from the popupOpened event,  animateFadingPopup which starts a timer and provides the initial delay before we start to fade the popup. The function that applies the fade animation to the popup - initiatePopupFade. The callback function - closeFadedPopup used to reset the style class and correctly hide the popup so that it can be invoked again and again.   A utility function - findFadeContainer, which is responsible for locating the correct child component of the popup to actually apply the style to. Function - animateFadingPopup This function, as stated is the one hooked up to the popupOpened event via a clientListener. Because of when the code is called it does not actually matter how you launch the popup, or if the popup is re-used from multiple places. All usages will get the fade behavior. /**  * Client listener which will kick off the animation to fade the dialog and register  * a callback to correctly reset the popup once the animation is complete  * @param event  */ function animateFadingPopup(event) { var fadePopup = event.getSource();   var fadeCandidate = false;   //Ensure that the popup is initially Opaque   //This handles the situation where the user has dismissed   //the popup whilst it was in the process of fading   var fadeContainer = findFadeContainer(fadePopup);   if (fadeContainer != null) {     fadeCandidate = true;     fadeContainer.setStyleClass("popupFadeReset");   }   //Only continue if we can actually fade this popup   if (fadeCandidate) {   //See if a delay has been specified     var waitTimeSeconds = event.getSource().getProperty('preFadeDelay');     //Default to 5 seconds if not supplied     if (waitTimeSeconds == undefined) {     waitTimeSeconds = 5;     }     // Now call the fade after the specified time     var fadeFunction = function () {     initiatePopupFade(fadePopup);     };     var fadeDelayTimer = setTimeout(fadeFunction, (waitTimeSeconds * 1000));   } } The things to note about this function is the initial check that we have to do to ensure that the container is currently visible and reset it's style to ensure that it is.  This is to handle the situation where the popup has begun the fade, and yet the user has still explicitly dismissed the popup before it's complete and in doing so has prevented the callback function (described later) from executing. In this particular situation the initial display of the dialog will be (apparently) missing it's normal animation but at least it becomes visible to the user (and most users will probably not notice this difference in any case). You'll notice that the style that we apply to reset the  opacity - popupFadeReset, is not applied to the popup component itself but rather the dialog or panelWindow within it. More about that in the description of the next function findFadeContainer(). Finally, assuming that we have a suitable candidate for fading, a JavaScript  timer is started using the specified preFadeDelay wait time (or 5 seconds if that was not supplied). When this timer expires then the main animation styleclass will be applied using the initiatePopupFade() function Function - findFadeContainer As a component, the <af:popup> does not support styleClass attribute, so we can't apply the animation style directly.  Instead we have to look for the container within the popup which defines the window object that can have a style attached.  This is achieved by the following code: /**  * The thing we actually fade will be the only child  * of the popup assuming that this is a dialog or window  * @param popup  * @return the component, or null if this is not valid for fading  */ function findFadeContainer(popup) { var children = popup.getDescendantComponents();   var fadeContainer = children[0];   if (fadeContainer != undefined) {   var compType = fadeContainer.getComponentType();     if (compType == "oracle.adf.RichPanelWindow" || compType == "oracle.adf.RichDialog") {     return fadeContainer;     }   }   return null; }  So what we do here is to grab the first child component of the popup and check its type. Here I decided to limit the fade behaviour to only <af:dialog> and <af:panelWindow>. This was deliberate.  If  we apply the fade to say an <af:noteWindow> you would see the text inside the balloon fade, but the balloon itself would hang around until the fade animation was over and then hide.  It would of course be possible to make the code smarter to walk up the DOM tree to find the correct <div> to apply the style to in order to hide the whole balloon, however, that means that this JavaScript would then need to have knowledge of the generated DOM structure, something which may change from release to release, and certainly something to avoid. So, all in all, I think that this is an OK restriction and frankly it's windows and dialogs that I wanted to fade anyway, not balloons and menus. You could of course extend this technique and handle the other types should you really want to. One thing to note here is the selection of the first (children[0]) child of the popup. It does not matter if there are non-visible children such as clientListener before the <af:dialog> or <af:panelWindow> within the popup, they are not included in this array, so picking the first element in this way seems to be fine, no matter what the underlying ordering is within the JSF source.  If you wanted a super-robust version of the code you might want to iterate through the children array of the popup to check for the right type, again it's up to you.  Function -  initiatePopupFade  On to the actual fading. This is actually very simple and at it's heart, just the application of the popupFadeAnimate style to the correct component and then registering a callback to execute once the fade is done. /**  * Function which will kick off the animation to fade the dialog and register  * a callback to correctly reset the popup once the animation is complete  * @param popup the popup we are animating  */ function initiatePopupFade(popup) { //Only continue if the popup has not already been dismissed    if (popup.isPopupVisible()) {   //The skin styles that define the animation      var fadeoutAnimationStyle = "popupFadeAnimate";     var fadeAnimationResetStyle = "popupFadeReset";     var fadeContainer = findFadeContainer(popup);     if (fadeContainer != null) {     var fadeContainerReal = AdfAgent.AGENT.getElementById(fadeContainer.getClientId());       //Define the callback this will correctly reset the popup once it's disappeared       var fadeCallbackFunction = function (event) {       closeFadedPopup(popup, fadeContainer, fadeAnimationResetStyle);         event.target.removeEventListener("webkitTransitionEnd", fadeCallbackFunction);       };       //Initiate the fade       fadeContainer.setStyleClass(fadeoutAnimationStyle);       //Register the callback to execute once fade is done       fadeContainerReal.addEventListener("webkitTransitionEnd", fadeCallbackFunction, false);     }   } } I've added some extra checks here though. First of all we only start the whole process if the popup is still visible. It may be that the user has closed the popup before the delay timer has finished so there is no need to start animating in that case. Again we use the findFadeContainer() function to locate the correct component to apply the style to, and additionally we grab the DOM id that represents that container.  This physical ID is required for the registration of the callback function. The closeFadedPopup() call is then registered on the callback so as to correctly close the now transparent (but still there) popup. Function -  closeFadedPopup The final function just cleans things up: /**  * Callback function to correctly cancel and reset the style in the popup  * @param popup id of the popup so we can close it properly  * @param contatiner the window / dialog within the popup to actually style  * @param resetStyle the syle that sets the opacity back to solid  */ function closeFadedPopup(popup, container, resetStyle) { container.setStyleClass(resetStyle);   popup.cancel(); }  First of all we reset the style to make the popup contents opaque again and then we cancel the popup.  This will ensure that any of your user code that is waiting for a popup cancelled event will actually get the event, additionally if you have done this as a modal window / dialog it will ensure that the glasspane is dismissed and you can interact with the UI again.  What's Next? There are several ways in which this technique could be used, I've been working on a popup here, but you could apply the same approach to in-line messages. As this code (in the popup case) is generic it will make s pretty nice declarative component and maybe, if I get time, I'll look at constructing a formal Growl component using a combination of this technique, and active data push. Also, I'm sure the above code can be improved a little too.  Specifically things like registering a popup cancelled listener to handle the style reset so that we don't loose the subtle animation that takes place when the popup is opened in that situation where the user has closed the in-fade dialog.

    Read the article

  • Intercept close Popup from Parent Page

    - by sangi
    Hi all, I have a question. In an html page, I have javascript code that allows me to open and close a popup window by clicking on a link displayed in the link, so the text displayed in the link changes to the state of the popup window (open-closed). With a variable true / false I manage the opening and closing of the popup window to click on a link whose text is aligned "opened popup" / "closed popup". The next step is to make this same change in state (true / false, "opened popup" / "close popup") directly by closing the popup window. The idea is to not have to refresh the page. Is this possible? Thank you and best regards

    Read the article

  • Detect blocked popup in Chrome

    - by Andrew
    I am aware of javascript techniques to detect whether a popup is blocked in other browsers (as described in the answer to this question). Here's the basic test: var newWin = window.open(url); if(!newWin || newWin.closed || typeof newWin.closed=='undefined') { //POPUP BLOCKED } But this does not work in Chrome. The "POPUP BLOCKED" section is never reached when the popup is blocked. Of course, the test is working to an extent since Chrome doesn't actually block the popup, but opens it in a tiny minimized window at the lower right corner which lists "blocked" popups. What I would like to do is be able to tell if the popup was blocked by Chrome's popup blocker. I try to avoid browser sniffing in favor of feature detection. Is there a way to do this without browser sniffing? Edit: I have now tried making use of newWin.outerHeight, newWin.left, and other similar properties to accomplish this. Google Chrome returns all position and height values as 0 when the popup is blocked. Unfortunately, it also returns the same values even if the popup is actually opened for an unknown amount of time. After some magical period (a couple of seconds in my testing), the location and size information is returned as the correct values. In other words, I'm still no closer to figuring this out. Any help would be appreciated.

    Read the article

  • popup with dynamic menuitems, each menuitem is another popup

    - by encryptor
    I am building an extension that has a pop up whose elements are constructed by a function call everytime the mouse hovers over the popup option. I am able to achieve this. Now I need to have a popup for each of the menu item (inside the original popup) which is not dynamic though. I have this code, but it does not work: for (var m=0; m < localpubliclist.length; m++) { var newItem = document.createElement("menu"); newItem.setAttribute("label", publicdisplayname[m]); newItem.setAttribute("id", "public" + m); myMenuPopup.appendChild(newItem); var newpopup = document.createElement("menupopup"); newpopup.setAttribute("id","publicpop" + m); newItem.appendChild(newpopup); var new1= document.createElement("menuitem"); new1.setAttribute("label", "Home"); new1.setAttribute("id", "publichome" + m); newpopup.appendChild(new1); } doing this forms the first popup where i can see all my menu with names publicdisplayname[m]. each of these is to be a popup which displays "Home". This does not work. the second popup (popup on publicdisplayname[m]) does not open. i have been stuck on this for quite some time and have tried various things cut it doesnt work. Can we do this at all? can we have double dynamic popups?

    Read the article

  • Auto showing tips and closing popup when lost focus

    - by darkwindkey
    I have two elements: a TextBox, and a Popup, where the popup contains a tree view to show some tips according to text of TextBox. When the textBox got the KeyDown Event, the KeyDown directly executes pup.IsOpen=true to show the popup tips. However, I also want to show the popup tips when the mouse on clicking the TextBox, and auto closing the popups when the mouse click on any place (besides the TextBox and the TreeView in Popup). I have tried some cases but do not works fine. Case1: Add pup.IsOpen=true; in TextBox.PreviewMouseUp, the popup will stay opening, even if I click any other place in the window. Case2: Add pup.IsOpen=true in TextBox.PreviewMouseDown, the popup tips only shows on keep clicking the Mouse. Case3: Using CheckBox with Binding IsChecked to Popup.IsOpen works fine. but the tips is listed according to the content of the TextBox, therefore the checkbox is not editable for user... Here is my code now: <Window x:Class="popUpTesting.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="350" Width="525"> <Grid> <TextBox Name="SearchBox" HorizontalAlignment="Center" TextWrapping="Wrap" Text="TextBox" VerticalAlignment="Center" KeyDown="SearchBox_KeyDown" PreviewMouseUp="SearchBox_PreviewMouseUp" /> <Popup Placement="Bottom" AllowsTransparency="True" PopupAnimation="Fade" StaysOpen="false" x:Name="pup" PlacementTarget="{Binding ElementName=SearchBox}" IsOpen="False" > <Grid> <TreeView HorizontalAlignment="Left" Height="200" VerticalAlignment="Top" Width="200"> <TreeViewItem Header="A"> <TreeViewItem Header="A1"/> </TreeViewItem> <TreeViewItem Header="B"></TreeViewItem> <TreeViewItem Header="C"></TreeViewItem> <TreeViewItem Header="D"></TreeViewItem> </TreeView> </Grid> </Popup> </Grid> </Window> and the event functions: private void SearchBox_KeyDown(object sender, KeyEventArgs e) { pup.IsOpen = true; } private void SearchBox_PreviewMouseUp(object sender, MouseButtonEventArgs e) { pup.IsOpen = true; }

    Read the article

  • Popup browser incompability

    - by Cornelis
    I have a popup with drop down menus on it. I've scaled it down and simplified it for test purposes, but it still doesn't work the way I want/it should. <!DOCTYPE html> <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script> <script type="text/javascript"> jQuery(document).ready(function(){ jQuery('.trigger').click(function(){ var picker = jQuery('.popup'); jQuery('<div></div>').css({ height: screen.height, width: screen.width, position: 'absolute', 'z-index': -1, top: picker.offset().top*-1, left: picker.offset().left*-1, border: '1px solid red' }).click(function(){ picker.trigger('focusout'); jQuery(this).hide(); }).prependTo(picker); picker.css('visibility', 'visible'); }); jQuery('.popup').live("focusout", function() { jQuery('.popup').fadeTo(500, 0.0, function() { jQuery('.popup').css('visibility', 'hidden'); jQuery('.popup').css('opacity', '1.0'); }); }); }); </script> </head> <body> <p> <input type=text class=trigger /> <div id=popup-div class=popup style="visibility: hidden; border: 1px solid red"> <select> <option>option1</option> </select> <p>Popup text</p> </div> </p> </body> When you click on the input field, a 'popup' appears, if you click outside the red border it fades away. If you click on the select option it shouldn't dissappear! However on this point, Chrome doesn't work the same as IE/FF/Opera/Safari, and makes the div dissappear. (Using Chrome 4.0.295.0) Does anybody knows a work-around for Chrome? Calling event.stopPropagation() on select elements did not work so far

    Read the article

  • set the focus of a popup window everytime

    - by hunt
    I have two pages one.html and two.html i am opening a new window using following code //here popup is a global variable popup=window.open('two.html','two'); for the first time a popup window open successfully and get the focus but if i try to open it again without closing already opened popup then two.html is not getting focus for the second time. note: i have set popup window's name as 'two'

    Read the article

  • [Windows 8] Application bar popup button

    - by Benjamin Roux
    Here is a small control to create an application bar button which will display a content in a popup when the button is clicked. Visually it gives this So how to create this? First you have to use the AppBarPopupButton control below.   namespace Indeed.Controls { public class AppBarPopupButton : Button { public FrameworkElement PopupContent { get { return (FrameworkElement)GetValue(PopupContentProperty); } set { SetValue(PopupContentProperty, value); } } public static readonly DependencyProperty PopupContentProperty = DependencyProperty.Register("PopupContent", typeof(FrameworkElement), typeof(AppBarPopupButton), new PropertyMetadata(null, (o, e) => (o as AppBarPopupButton).CreatePopup())); private Popup popup; private SerialDisposable sizeChanged = new SerialDisposable(); protected override void OnTapped(Windows.UI.Xaml.Input.TappedRoutedEventArgs e) { base.OnTapped(e); if (popup != null) { var transform = this.TransformToVisual(Window.Current.Content); var offset = transform.TransformPoint(default(Point)); sizeChanged.Disposable = PopupContent.ObserveSizeChanged().Do(_ => popup.VerticalOffset = offset.Y - (PopupContent.ActualHeight + 20)).Subscribe(); popup.HorizontalOffset = offset.X + 24; popup.DataContext = this.DataContext; popup.IsOpen = true; } } private void CreatePopup() { popup = new Popup { IsLightDismissEnabled = true }; popup.Closed += (o, e) => this.GetParentOfType<AppBar>().IsOpen = false; popup.ChildTransitions = new Windows.UI.Xaml.Media.Animation.TransitionCollection(); popup.ChildTransitions.Add(new Windows.UI.Xaml.Media.Animation.PopupThemeTransition()); var container = new Grid(); container.Children.Add(PopupContent); popup.Child = container; } } } .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; } The ObserveSizeChanged method is just an extension method which observe the SizeChanged event (using Reactive Extensions - Rx-Metro package in Nuget). If you’re not familiar with Rx, you can replace this line (and the SerialDisposable stuff) by a simple subscription to the SizeChanged event (using +=) but don’t forget to unsubscribe to it ! public static IObservable<Unit> ObserveSizeChanged(this FrameworkElement element) { return Observable.FromEventPattern<SizeChangedEventHandler, SizeChangedEventArgs>( o => element.SizeChanged += o, o => element.SizeChanged -= o) .Select(_ => Unit.Default); } .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; } The GetParentOfType extension method just retrieve the first parent of type (it’s a common extension method that every Windows 8 developer should have created !). You can of course tweak to control (for example if you want to center the content to the button or anything else) to fit your needs. How to use this control? It’s very simple, in an AppBar control just add it and define the PopupContent property. <ic:AppBarPopupButton Style="{StaticResource RefreshAppBarButtonStyle}" HorizontalAlignment="Left"> <ic:AppBarPopupButton.PopupContent> <Grid> [...] </Grid> </ic:AppBarPopupButton.PopupContent> </ic:AppBarPopupButton> .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; } When the button is clicked the popup is displayed. When the popup is closed, the app bar is closed too. I hope this will help you !

    Read the article

  • UIWebview handle popup view

    - by Tuan Nguyen
    I've a webpage with one text-box and one button. Click on button will show a popup for searching. On popup page,has 2 buttons, "Search" and "Close". Input the text and click Search, the result will display on a list on this popup, click on a row will close the popup and fill the value to text-box on main-page. On Destop browser, it works fine On Safari on iPad, it will open new tab instead of a popup but work fine. UIWebview in my app, on main-page, click the button, I will go to Search page, but when click Search button and close button, nothing happened, I know because 2 buttons will close the popup or the tab, but I don't know how to handle on my Webview, and also I can fill data to main-page or not? Could anyone point me away? Thanks,

    Read the article

  • How can I find out what site a popup ad came from?

    - by ændrük
    This is the situation: I've been browsing the web for an hour in pursuit of some bit of technical information and have visited several dozen websites that I don't even remember anymore. I've finally found what I need so I start closing the web browser, only to discover that — aaargh! — there's a popup ad hiding underneath! My blood boils. What insidious website is responsible for this circumvention of my browser's popup blocker? I want to make it pay for its crime. I'll write angry emails. Leave bad reviews. Even block it from my Google search results — yes, that'll show it! But I've reached an impediment. The offending site has already been closed. Is it too late to deduce the advertisement's origin? Or can I somehow un-pop the popup? Here's a test page. With only the popup left on your screen, can you deduce that it was caused by visiting PasteHTML?

    Read the article

  • Nifty popup fails to register

    - by Snailer
    I'm new to Nifty GUI, so I'm following a tutorial here for making popups. For now, I'm just trying to get a very basic "test" popup to show, but I get multiple errors and none of them make much sense. To show a popup, I believe it is necessary to first have a Nifty Screen already showing, which I do. So here is the ScreenController for the working Nifty Screen: public class WorkingScreen extends AbstractAppState implements ScreenController { //Main is my jme SimpleApplication private Main app; private Nifty nifty; private Screen screen; public WorkingScreen() {} public void equip(String slotstr) { int slot = Integer.valueOf(slotstr); System.out.println("Equipping item in slot "+slot); //Here's where it STOPS working. app.getPlayer().registerPopupScreen(nifty); System.out.println("Registered new popup"); Element ele = nifty.createPopup(app.getPlayer().POPUP); System.out.println("popup is " +ele); nifty.showPopup(nifty.getCurrentScreen(), ele.getId(), null); } @Override public void initialize(AppStateManager stateManager, Application app) { super.initialize(stateManager, app); this.app = (Main)app; } @Override public void update(float tpf) { /** jME update loop! */ } public void bind(Nifty nifty, Screen screen) { this.nifty = nifty; this.screen = screen; } When I call equip(0) the system prints Equipping item in slot 0, then a lot of errors and none of the subsequent println()'s. Clearly it botches somewhere in Player.registerPopupScreen(Nifty nifty). Here's the method: public final String POPUP = "Test Popup"; public void registerPopupScreen(Nifty nifty) { System.out.println("Attempting new popup"); PopupBuilder b = new PopupBuilder(POPUP) {{ childLayoutCenter(); backgroundColor("#000a"); panel(new PanelBuilder() {{ id("List"); childLayoutCenter(); height(percentage(75)); width(percentage(50)); control(new ButtonBuilder("TestButton") {{ label("TestButton"); width("120px"); height("40px"); align(Align.Center); }}); }}); }}; System.out.println("PopupBuilder success."); b.registerPopup(nifty); System.out.println("Registerpopup success."); } Because that first println() doesn't show, it looks like this method isn't even called at all! Edit After removing all calls on the Player object, the popup works. It seems I'm not "allowed" to access the player from the ScreenController. Unfortunate, since I need information on the player for the popup. Is there a workaround?

    Read the article

  • WPF Open Combobox popup on Focus or GotFocus

    - by ashish.magroria
    Hi, I am trying to open the combobox popup when it is focused using Style/Event Trigger I used the following code in my Combobox control Template: <ControlTemplate x:Key="ComboBoxTemplate" TargetType="{x:Type ComboBox}"> <Grid > <ToggleButton Grid.Column="2" Template="{DynamicResource ComboBoxToggleButton}" x:Name="ToggleButton" Focusable="false" IsChecked="{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" ClickMode="Press"/> <ContentPresenter HorizontalAlignment="Left" Margin="3,3,23,3" x:Name="ContentSite" VerticalAlignment="Center" Content="{TemplateBinding SelectionBoxItem}" ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}" ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}" IsHitTestVisible="False"/> <TextBox Visibility="Hidden" Template="{DynamicResource ComboBoxTextBox}" HorizontalAlignment="Left" Margin="3,3,23,3" x:Name="PART_EditableTextBox" Style="{x:Null}" VerticalAlignment="Center" Focusable="True" Background="Transparent" IsReadOnly="{TemplateBinding IsReadOnly}"/> <Popup IsOpen="{TemplateBinding IsDropDownOpen}" Placement="Bottom" x:Name="Popup" Focusable="False" AllowsTransparency="True" PopupAnimation="Slide"> <Grid MaxHeight="{TemplateBinding MaxDropDownHeight}" MinWidth="{TemplateBinding ActualWidth}" x:Name="DropDown" SnapsToDevicePixels="True"> <Border x:Name="DropDownBorder" Background="{DynamicResource ShadeBrush}" BorderBrush="{DynamicResource SolidBorderBrush}" BorderThickness="1"/> <ScrollViewer Margin="4,6,4,6" SnapsToDevicePixels="True" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" CanContentScroll="True"> <StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Contained"/> </ScrollViewer> </Grid> </Popup> </Grid> <ControlTemplate.Triggers> **<Trigger Property="IsMouseOver" Value="True"> <Setter Property="IsOpen" Value="True" TargetName="Popup"/> </Trigger>** </ControlTemplate.Triggers> </ControlTemplate> But nothing happens with this code. So I trid the following Event trigger in ControlTemplate.Triggers <EventTrigger RoutedEvent="UIElement.GotFocus"> <BeginStoryboard> <Storyboard > <BooleanAnimationUsingKeyFrames Storyboard.TargetName="Popup" Storyboard.TargetProperty="IsOpen" FillBehavior="HoldEnd"> <DiscreteBooleanKeyFrame KeyTime="00:00:00" Value="True" /> </BooleanAnimationUsingKeyFrames> </Storyboard> </BeginStoryboard> </EventTrigger> <EventTrigger RoutedEvent="UIElement.LostFocus"> <BeginStoryboard> <Storyboard > <BooleanAnimationUsingKeyFrames Storyboard.TargetName="Popup" Storyboard.TargetProperty="IsOpen" FillBehavior="HoldEnd"> <DiscreteBooleanKeyFrame KeyTime="00:00:00" Value="False" /> </BooleanAnimationUsingKeyFrames> </Storyboard> </BeginStoryboard> </EventTrigger> Now this helps open the popup on focus, but when I select any item from dropdown the pop up doesnt disappear as usual; it stays open. it closes only after I click somewhere else in the window. Can someone please suggest the proper way to do this Thanks in advance

    Read the article

  • Java Swing popup visibility

    - by Octavio
    Why a popup created like this is shown in front of all windows applications with JRE 1.6.0_18 but it doesn't using 1.6.0_03 ? PopupFactory popupFactory = new PopupFactory(); Popup popup= popupFactory.getPopup(null,new JPanel(),200,200); popup.show();

    Read the article

  • FF extension: a popup with dynamic menuitems, with each menu item having another popup

    - by encryptor
    I am building an extension that has a popup whose elements are constructed by a function call everytime the mouse hovers over the popup option. I am able to achieve this. Now I need to have a popup for each of the menu item (inside the original popup) which is not dynamic though. I have this code, but it does not work: var myMenuPopup = document.getElementById("file-popup4"); for (var m=0; m var newItem = document.createElement("menupopup"); newItem.setAttribute("label", publicdisplayname[m]); newItem.setAttribute("id", "public" + m); var new1 = document.createElement("menuitem"); new1.setAttribute("label","Home"); new1.setAttribute("id", "publichome" + m); newItem.onclick = function(){ } newItem.appendChild(new1); myMenuPopup.appendChild(newItem); but this doesnt work. Can someone please help me out with whats the problem

    Read the article

  • Set the focus on Popup Panel

    - by Jan-Frederik Carl
    Hello, I use a modalpopupextender to show a popup when the user clicks on a button. <ajaxToolkit:ModalPopupExtender ID="mpe1" runat="server" TargetControlID="statusInfoLb" PopupControlID="statusInfoPanel" DropShadow="false" OkControlID="okBtn" OnOkScript="onOk()"> </ajaxToolkit:ModalPopupExtender> <asp:Panel ID="statusInfoPanel" runat="server" Height="185px" Width="454px" SkinID="Panel_Notification2" DefaultButton="okBtn"> The panel has an OK-Button to dispose the popup. It is also possible to click Return to dispose the popup, because the panel has the property DefaultButton="okBtn". But this only works when the popup has the focus, which is not so from the start. How do I get the popup panel to have the focus when it shows? I would like to use jQuery.

    Read the article

  • MouseLeave event in Silverlight 3 PopUp control

    - by AKa
    I want use PopUp (System.Windows.Controls.Primitives.PopUp) control to show some context menu. After mouse leaves, should automatically close. But eventhandler for MouseLeave is never executed. Why? SAMPLE: void DocumentLibrary_Loaded(object sender, RoutedEventArgs e) { DocumentLibraryDialog documentLibraryDialog = new DocumentLibraryDialog(); _popUpDocumentLibraryDialog = new Popup(); _popUpDocumentLibraryDialog.Width = 70; _popUpDocumentLibraryDialog.Height = 20; _popUpDocumentLibraryDialog.MouseLeave += new MouseEventHandler(_popUpDocumentLibraryDialog_MouseLeave); _popUpDocumentLibraryDialog.Child = documentLibraryDialog; } void _popUpDocumentLibraryDialog_MouseLeave(object sender, MouseEventArgs e) { Popup currentPopUp = (Popup)sender; if (currentPopUp.IsOpen) (currentPopUp.IsOpen) = false; } Regards Anton Kalcik

    Read the article

  • [Rails] Cross Browser Popup size woes

    - by stephemurdoch
    I need to display certain content inside a popup window, and the body element must be 320px by 300px for styling purposes So I do the following: %p = link_to "Play in popup", popup_podcast_path(@podcast), :popup => ['new_window','height=300,width=320,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes'] Firefox does exactly what I ask it to do, it displays a popup window, with a page body that is 320px wide and 300px high, so my content fits perfectly inside. But Chrome includes the browser frame dimensions when sizing the popup, which means that the body element is less than the required size.... i.e. if the browser titlebar is 10px high, then this is subtracted from the space allocated to the body element How do I tell Chrome, that I want the body element to be 320 by 300, and that I dont want it to subtract the width and height of the browser frame from body element dimensions It's a bit like the old box-model problem where FF and IE added padding in different ways except firefox adds the browser frame outside the desired 320x300 size, and Chrome is adding it inside

    Read the article

  • Spring-webflow error popup tweak

    - by igorp1024
    There is a link in a spring-webflow2 based application which start different flows. Flows are shown in popup (popup=true). If the session is expired or server is unavailable, the spring-webflow shows small empty popup with "Ajax Request Error" tooltip shown on mouse over. Is it possible to tweak the popup in order to give the user an ability to either re-login or to just close the popup and retry the request? EDIT: Or maybe some ideas how to force Spring-Dojo to make a redirect to login page?

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >