How to pop up a Modal dialog on the top.

Hi ALL,
I want to pop up a dialog from background thread, and make it on the top level, any suggestion please.
First: JFrame.show(), and then start a background thread to monitor some event.
when the event happen, it will start to pop up a warning message, the user has to response to it.
otherwise user can not do anything, however the background is still running.
I want to use JOptionPanel, but it seem does not work good.
   _timer = new Timer(30*1000, new ClockListener());
  class ClockListener implements ActionListener {
        public void actionPerformed(ActionEvent e) {
                if(event)
                  popUpDialog();
.........Thanks in advanced!

Use a SwingWorker. Do the backgrround monitoring in a while(true) loop (with a Thread.sleep) in doInBackground. Invoke process when your event is detected and show the dialog from publish.
db

Similar Messages

  • Pop-up Menu is aligned with the top of the window in IE7

    Using Fireworks MX I created a pop-up menu on an image I
    would like to put within a table not in the top of the window.
    If I view the page with Firefox, the menu is aligned with the
    image, but if I use IE7 the pop-up menu is aligned with the top of
    the window, far from the image.
    Can anyone help me to fix this problem, please?
    Thank you

    Paperetto wrote:
    > Using Fireworks MX I created a pop-up menu on an image I
    would like to put
    > within a table not in the top of the window.
    > If I view the page with Firefox, the menu is aligned
    with the image, but if I
    > use IE7 the pop-up menu is aligned with the top of the
    window, far from the
    > image.
    > Can anyone help me to fix this problem, please?
    You'll need to place the menu in its final position in
    Fireworks, and
    then build your page around it in Dreamweaver. A better
    option would be
    to build the menu yourself from scratch. You can learn how to
    do that here:
    http://www.projectseven.com/tutorials/navigation/index.htm
    Linda Rathgeber [PVII] *Adobe Community Expert-Fireworks*
    http://www.projectseven.com
    Fireworks Newsgroup:
    news://forums.projectseven.com/fireworks/
    CSS Newsgroup: news://forums.projectseven.com/css/
    http://www.adobe.com/communities/experts/

  • How do I get my menu bar at the top of the page with no gaps?

    How do I get my menu bar at the top of the page with no gaps? Whenever I move it there is a huge gap at the top of the page which I cant seem to get rid of, i posted about this before but none of the suggestions seemed to work for me. i'm not very good with css so im not really sure where to find the problem. There are generally gaps everywhere which looks at absolute mess, no clue how they got there and why, there is a huge gap underneath my menu bar too which wasnt there before. how do i get rid of this too? its probably some padding a or margin but no clue where.
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Home</title>
    <link href="main.css" rel="stylesheet" type="text/css" />
    <link href="style2.css" rel="stylesheet" type="text/css" />
    <!--embedded styles for this page only-->
    <style type="text/css">
    body {
    margin:0;
    padding:0;
    font: 1em/1.5 "Lucida Sans", "Lucida Sans Unicode";
    #wrapper {
    width: 1064px;
    margin: 0 auto; /**with width, this centers page on screen**/
    background: #FFF;
    text-align:center;
    .clearing {
    clear:left;
    height:px;
    width: 100%;
    </style>
    <script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
    <link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
    <div id="wrapper"> <a href="home.html"><img src="_Business_Cards/banner copy.jpg" alt="banner" width="1064" height="374" align="top" /></a>
    <!--begin menu -->
    <ul id="MenuBar1" class="MenuBarHorizontal">
       <li><a href="home.html">Home</a></li>
       <li><a href="#" class="MenuBarItemSubmenu">Lingerie</a>
         <ul>
           <li><a href="#">Camis &amp; Nightslips</a>        </li>
           <li><a href="#" class="MenuBarItemSubmenu">Garter Belts &amp; Girdles</a>
             <ul>
               <li><a href="#">Tops</a></li>
               <li><a href="#">Bottoms</a></li>
               <li><a href="#">Accessories</a></li>
             </ul>
           </li>
           <li><a href="#">Sets</a></li>
           <li><a href="#">Knickers</a></li>
         </ul>
       </li>
       <li><a class="MenuBarItemSubmenu" href="#">Swimwear</a>
         <ul>
           <li><a href="t-shirt shop.html">Bikini</a></li>
           <li><a href="t-shirt shop.html">Tankini</a></li>
           <li><a href="t-shirt shop.html">One-Piece</a></li>
           <li><a href="#">Monokini</a></li>
         </ul>
       </li>
       <li><a href="#" class="MenuBarItemSubmenu">Men's</a>
         <ul>
           <li><a href="#">Boxer's</a></li>
         </ul>
       </li>
       <li><a href="#" class="MenuBarItemSubmenu">Extras</a>
         <ul>
           <li><a href="#">Bags</a></li>
           <li><a href="#" class="MenuBarItemSubmenu">Dancewear</a>
             <ul>
               <li><a href="#">Leotards</a></li>
               <li><a href="#">Crop Tops</a></li>
               <li><a href="#">Hotpants</a></li>
             </ul>
           </li>
         </ul>
       </li>
       <li><a href="clearance.html">Clearance</a></li>
    <li><a href="pastpro.html">Gallery</a></li>
    <li><a href="Contact.html">Contact</a></li>
    </ul>
    <h2> </h2>
    <div id="thumbs" width="192"><!--end wrapper -->
      <p align="center"><!-- Begin DWUser_EasyRotator -->
    <script type="text/javascript" src="http://c520866.r66.cf2.rackcdn.com/1/js/easy_rotator.min.js"></script>
    <div class="dwuserEasyRotator" style="width: 1064px; height: 561px; position:relative; text-align: left;" data-erConfig="{autoplayEnabled:true, lpp:'102-105-108-101-58-47-47-47-67-58-47-85-115-101-114-115-47-87-105-108-108-105-97-109 -47-68-111-99-117-109-101-110-116-115-47-69-97-115-121-82-111-116-97-116-111-114-80-114-10 1-118-105-101-119-47-112-114-101-118-105-101-119-95-115-119-102-115-47', wv:1, autoplayDelay:3000, autoplayStopOnInteraction:false}" data-erName="HomepageSlideshow" data-erTID="{zp7zmhgwl9549847691831}">
              <div data-ertype="content" style="display: none;"><ul data-erlabel="Main Category">
              <li>
                        <img class="main" src="slideshowpictures/966629_346958598773375_2105784298_o.jpg" alt="One-Off Triangular Soft Bra &amp; High-Waist Knicker Set" />
                        <img class="thumb" src="slideshowpictures/966629_346958598773375_2105784298_o.jpg" />
                        <span class="title">One-Off Triangular Soft Bra & High-Waist Knicker Set</span>
              </li>
              <li>
                        <img class="main" src="slideshowpictures/thong ebay.jpg" alt="Pink + Aqua Thongs (Part of Nightslip and Thong set)" />
                        <img class="thumb" src="slideshowpictures/thong ebay.jpg" />
                        <span class="title">Pink + Aqua Thongs (Part of Nightslip and Thong set)</span>
              </li>
              <li>
                        <img class="main" src="slideshowpictures/DSC_7405z.jpg" alt="Floral High-Waist Lace Panel Knicker" />
                        <img class="thumb" src="slideshowpictures/DSC_7405z.jpg" />
                        <span class="title">Floral High-Waist Lace Panel Knicker</span>
              </li>
              <li>
                        <img class="main" src="slideshowpictures/DSC_0018 copy.jpg" alt="Navy Blue Velvet High-Waist Bikini Set" />
                        <img class="thumb" src="slideshowpictures/DSC_0018 copy.jpg" />
                        <span class="title">Navy Blue Velvet High-Waist Bikini Set</span>
              </li>
              <li>
                        <img class="main" src="slideshowpictures/DSC_7420.jpg" alt="Pink &amp; Aqua Nightslips (Part of Nightslip &amp; Thong set)" />
                        <img class="thumb" src="slideshowpictures/DSC_7420.jpg" />
                        <span class="title">Pink & Aqua Nightslips (Part of Nightslip & Thong set)</span>
              </li>
              <li>
                        <img class="main" src="slideshowpictures/1208838_345346948934540_826580146_n.jpg" alt="Black Floral Bandeau &amp; Lace Girdle Set" />
                        <img class="thumb" src="slideshowpictures/1208838_345346948934540_826580146_n.jpg" />
                        <span class="title">Black Floral Bandeau & Lace Girdle Set</span>
              </li>
              <li>
                        <img class="main" src="slideshowpictures/1176249_10201020390646766_1642170049_n.jpg" alt="Aqua Polka-Dot High-Waist Bikini" />
                        <img class="thumb" src="slideshowpictures/1176249_10201020390646766_1642170049_n.jpg" />
                        <span class="title">Aqua Polka-Dot High-Waist Bikini</span>
              </li>
              <li>
                        <img class="main" src="slideshowpictures/1012714_10151762577141348_907183642_n.jpg" alt="Maroon Velvet Bikini High-Waist Bottoms" />
                        <img class="thumb" src="slideshowpictures/1012714_10151762577141348_907183642_n.jpg" />
                        <span class="title">Maroon Velvet Bikini High-Waist Bottoms</span>
              </li>
              <li>
                        <img class="main" src="slideshowpictures/floral ebay.jpg" alt="Floral/Multi Bikini High-Waist Bottoms" />
                        <img class="thumb" src="slideshowpictures/floral ebay.jpg" />
                        <span class="title">Floral/Multi Bikini High-Waist Bottoms</span>
              </li>
              <li>
                        <img class="main" src="slideshowpictures/DSC_0096 copy9.jpg" alt="Purple &amp; Champagne Bandeau Bikini Tops" />
                        <img class="thumb" src="slideshowpictures/DSC_0096 copy9.jpg" />
                        <span class="title">Purple & Champagne Bandeau Bikini Tops</span>
              </li>
              <li>
                        <img class="main" src="slideshowpictures/1005246_10151762745636348_129531182_n.jpg" alt="Aqua Polka-Dot High-Waist Bikini" />
                        <img class="thumb" src="slideshowpictures/1005246_10151762745636348_129531182_n.jpg" />
                        <span class="title">Aqua Polka-Dot High-Waist Bikini</span>
              </li>
              <li>
                        <img class="main" src="slideshowpictures/DSC_73612.jpg" alt="Matching Orange/White Lace Crop Top &amp; Thong Set" />
                        <img class="thumb" src="slideshowpictures/DSC_73612.jpg" />
                        <span class="title">Matching Orange/White Lace Crop Top & Thong Set</span>
              </li>
              <li>
                        <img class="main" src="slideshowpictures/logo h copy.jpg" alt="Logo" />
                        <img class="thumb" src="slideshowpictures/logo h copy.jpg" />
                        <span class="title">Logo</span>
              </li>
    </ul>
    </div>
              <div data-ertype="layout" data-ertemplateName="NONE" style="">                    <div class="erimgMain" style="position: absolute; left:0;right:0;top:0;bottom:0;" data-erConfig="{__numTiles:3, scaleMode:'scaleDown', imgType:'main', __loopNextButton:false, __arrowButtonMode:'rollover'}">
                                  <div class="erimgMain_slides" style="position: absolute; left:0; top:0; bottom:0; right:0;">
                                            <div class="erimgMain_slide">
                                                      <div class="erimgMain_img" style="position: absolute; left: 0; right: 0; top: 0; bottom: 0;"></div>
                                            </div>
                                  </div>
                                  <div class="erimgMain_arrowLeft" style="position:absolute; left: 10px; top: 50%; margin-top: -15px;" data-erConfig="{image:'circleSmall', image2:'circleSmall'}"></div>
                                  <div class="erimgMain_arrowRight" style="position:absolute; right: 10px; top: 50%; margin-top: -15px;" data-erConfig="{image:'circleSmall', image2:'circleSmall'}"></div>
                        </div><div class="erabout erFixCSS3" style="color: #FFF; text-align: left; background: #000; background:rgba(0,0,0,0.93); border: 2px solid #FFF; padding: 20px; font: normal 11px/14px Verdana,_sans; width: 300px; border-radius: 10px; display:none;">
                                  This <a style="color:#FFF;" href="http://www.dwuser.com/easyrotator/" target="_blank">jQuery slider</a> was created with the free <a style="color:#FFF;" href="http://www.dwuser.com/easyrotator/" target="_blank">EasyRotator</a> software from DWUser.com.
                                  <br /><br />
                Use WordPress? The free <a style="color:#FFF;" href="http://www.dwuser.com/easyrotator/wordpress/" target="_blank">EasyRotator for WordPress</a> plugin lets you create beautiful <a style="color:#FFF;" href="http://www.dwuser.com/easyrotator/wordpress/" target="_blank">WordPress sliders</a> in seconds.
                                  <br /><br />
                                  <a style="color:#FFF;" href="#" class="erabout_ok">OK</a>  
                        </div>
                        <noscript>
                                  Rotator powered by <a href="http://www.dwuser.com/easyrotator/">EasyRotator</a>, a free and easy jQuery slider builder from DWUser.com.  Please enable JavaScript to view.
                        </noscript>
                        <script type="text/javascript">/*Avoid IE gzip bug*/(function(b,c,d){try{if(!b[d]){b[d]="temp";var a=c.createElement("script");a.type="text/javascript";a.src="http://easyrotator.s3.amazonaws.com/1/js/nozip/easy_rotator.min.js";c.getElementsByTagName("head")[0].appendChild(a)}}catch(e){alert("EasyRotator fail; contact support.")}})(window,document,"er_$144");</script>
              </div>
    </div>
    <!-- End DWUser_EasyRotator --></p>
    </div>
    <hr align="center" size="10" noshade="noshade" class="clearing" color="#999999" />
    <img src="https://www.paypalobjects.com/webstatic/mktg/logo/AM_mc_vs_dc_ae.jpg" alt="PayPal Acceptance Mark" width="192" height="38" border="0" align="right" />
    <div align="left">
      <p><a href="#" onclick="javascript:window.open('https://www.paypal.com/uk/cgi-bin/webscr?cmd=xpt/Marketing/popup/OLCWhatIsPayPal-outside', 'olcwhatispaypal','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=400, height=500');">Copyright &copy; Hannah-Rose 2013 > <a href="about.html">About</a> &gt; <a href="terms and conditions.html">Terms &amp; Conditions </a></p>
      <!-- PayPal Logo --><!-- PayPal Logo --><!-- PayPal Logo --><!-- PayPal Logo --></div>
    </div>
    <script type="text/javascript">
    var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
    </script>
    </body>
    </html>

    @charset "UTF-8";
    /* SpryMenuBarHorizontal.css - version 0.6 - Spry Pre-Release 1.6.1 */
    /* Copyright (c) 2006. Adobe Systems Incorporated. All rights reserved. */
    LAYOUT INFORMATION: describes box model, positioning, z-order
    /* The outermost container of the Menu Bar, an auto width box with no margin or padding */
    ul.MenuBarHorizontal
              padding: 0;
              list-style-type: none;
              font-size: 100%;
              cursor: default;
              width: 64em;
              margin-bottom: 0px;
              margin-left: auto;
              margin-top: 0px;
              margin-right: 0px;
    /* Set the active Menu Bar with this class, currently setting z-index to accomodate IE rendering bug: http://therealcrisp.xs4all.nl/meuk/IE-zindexbug.html */
    ul.MenuBarActive
              z-index: 1000;
    /* Menu item containers, position children relative to this container and are a fixed width */
    ul.MenuBarHorizontal li
              margin: 0;
              padding: 0;
              list-style-type: none;
              font-size: 100%;
              position: relative;
              text-align: left;
              cursor: pointer;
              width: 8em;
              float: left;
    /* Submenus should appear below their parent (top: 0) with a higher z-index, but they are initially off the left side of the screen (-1000em) */
    ul.MenuBarHorizontal ul
              margin: 0;
              padding: 0;
              list-style-type: none;
              font-size: 100%;
              z-index: 1020;
              cursor: default;
              width: 8.2em;
              position: absolute;
              left: -1000em;
    /* Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to auto so it comes onto the screen below its parent menu item */
    ul.MenuBarHorizontal ul.MenuBarSubmenuVisible
              left: auto;
    /* Menu item containers are same fixed width as parent */
    ul.MenuBarHorizontal ul li
              width: 8.2em;
    /* Submenus should appear slightly overlapping to the right (95%) and up (-5%) */
    ul.MenuBarHorizontal ul ul
              position: absolute;
              margin-top: -5%;
              margin-right: 0;
              margin-bottom: 0;
              margin-left: 95%;
    /* Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to 0 so it comes onto the screen */
    ul.MenuBarHorizontal ul.MenuBarSubmenuVisible ul.MenuBarSubmenuVisible
              left: auto;
              top: 0;
    DESIGN INFORMATION: describes color scheme, borders, fonts
    /* Submenu containers have borders on all sides */
    ul.MenuBarHorizontal ul
              border: 1px solid #CCC;
    /* Menu items are a light gray block with padding and no text decoration */
    ul.MenuBarHorizontal a
              display: block;
              cursor: pointer;
              background-color: #FFF;
              color: #333;
              text-decoration: none;
              font-family: Pristina;
              font-size: 21px;
              font-weight: normal;
              padding-right: 0.75em;
              padding-left: 0.75em;
              padding-top: 0.5em;
              padding-bottom: 0.5em;
    /* Menu items that have mouse over or focus have a blue background and white text */
    ul.MenuBarHorizontal a:hover, ul.MenuBarHorizontal a:focus
              background-color: #33C;
              color: #FFF;
    /* Menu items that are open with submenus are set to MenuBarItemHover with a blue background and white text */
    ul.MenuBarHorizontal a.MenuBarItemHover, ul.MenuBarHorizontal a.MenuBarItemSubmenuHover, ul.MenuBarHorizontal a.MenuBarSubmenuVisible
              background-color: #FFF;
              color: #666;
    SUBMENU INDICATION: styles if there is a submenu under a given menu item
    /* Menu items that have a submenu have the class designation MenuBarItemSubmenu and are set to use a background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal a.MenuBarItemSubmenu
              background-image: url(SpryMenuBarDown.gif);
              background-repeat: no-repeat;
              background-position: 95% 50%;
    /* Menu items that have a submenu have the class designation MenuBarItemSubmenu and are set to use a background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal ul a.MenuBarItemSubmenu
              background-image: url(SpryMenuBarRight.gif);
              background-repeat: no-repeat;
              background-position: 95% 50%;
    /* Menu items that are open with submenus have the class designation MenuBarItemSubmenuHover and are set to use a "hover" background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal a.MenuBarItemSubmenuHover
              background-image: url(SpryMenuBarDownHover.gif);
              background-repeat: no-repeat;
              background-position: 95% 50%;
    /* Menu items that are open with submenus have the class designation MenuBarItemSubmenuHover and are set to use a "hover" background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal ul a.MenuBarItemSubmenuHover
              background-image: url(SpryMenuBarRightHover.gif);
              background-repeat: no-repeat;
              background-position: 95% 50%;
    BROWSER HACKS: the hacks below should not be changed unless you are an expert
    /* HACK FOR IE: to make sure the sub menus show above form controls, we underlay each submenu with an iframe */
    ul.MenuBarHorizontal iframe
              position: absolute;
              z-index: 1010;
              filter:alpha(opacity:0.1);
    /* HACK FOR IE: to stabilize appearance of menu items; the slash in float is to keep IE 5.0 from parsing */
    @media screen, projection
              ul.MenuBarHorizontal li.MenuBarItemIE
                        display: inline;
                        f\loat: left;
                        background: #FFF;

  • How do I keep my status bar at the top and not moving from side to side and bottom of phone

    how do I keep my status bar at the top of my phone? I let my grandsn play a game on my phone and after he gave it back I noticed my status bar would move from the top to the side or bottom etc

    Reset, hold both home and power buttons until the iPhone begins to restart itself, ignore the slide to power off slider. Let the iPhone restart itself. Usually takes about 10 seconds of holding both buttons.
    Probably do not need this, but Portrait Lock can be set by, pressing home button twice quickly, slide bottom row of icons to the right one time, tap the Portrait Lock icon.

  • How can you make your persona show on the top and bottom? Also can you make it bigger at the top to show more of the picture?

    How can you make your persona show on the top and bottom?
    Also can you make it bigger at the top to show more of the picture?

    Add extra empty toolbars if you want to see more of the persona.<br />
    You can create extra toolbars to get extra space via View > Toolbars > Customize<br />
    You have to put something on a toolbar (drag a Space item onto it) before closing the Customize window because empty toolbars are automatically removed.<br />
    See http://kb.mozillazine.org/Toolbar_customization

  • How do I take a space out of the top of a resume template?

    How do I take a space out of the top of a resume template?

    Yes, there is a way.
    With the template open and the active page, click the Inspector button in the toolbar in the window -
    The Inspector window will open. You can move it to one side if it's on top of something. In the Inspector window, click the first icon in the row at the top; this sets it to Document Inspector. It's the one I've marked with an arrow, here -
    Underneath that row, click the Document button if it is not already highlighted. Then look down to the adjustment I've circled, and change it to suit your needs. You can use the arrow buttons just to the right of the box to do that, or select the box and type in a new amount.
    This is a "live" adjustment, meaning the display of the page in its window will change immediately to reflect adjustments you make.

  • My iPhone 5 have the glass popping sound when I press on the top left corner of my phone but I don't know why, I don't see any visibility of the glass coming out. My friends all told me to not exchange.

    My iPhone 5 have the glass popping sound when I press on the top left corner of my phone but I don't know why, I don't see any visibility of the glass coming out. My friends all told me to not exchange because after all the software is perfectly fine.

    My phone just turned 2 months old. But in Singapore as long your phone is under one year warranty I can still go for an exchange at the respective telco, but my friends all suggest me to not change now cause after changing it'll be a refurbished set instead of a brand new one.

  • How to write strings with an underline on the TOP-OF-PAGE of ALV

    How to write strings with an underline on the TOP-OF-PAGE of ALV

    if u r using classes and methods it can be done
    but if u r using normal fms and then u have to use HTML_TOP_OF_PAGE but the drawback for this it cannot be printed when the report is printed .

  • GUI hangs after it fail to pop up a modal dialog

    Hi everyone! I have a swing application that will pop up a log off confirm dialog (modal) when the user click on the "log off" button. It works fine for about 8 hours. Then when I click on the "log off" button, the dialog never pop up and the GUI is freezed, which means it does not react to user mouse click anymore, like a hidden modal dialog is in front. But actually there is no hidden dialog.
    At the same time, my windows XP freeze also. I cannot even open a folder. Then I kill the winrunner, and the XP is able to open a folder, but my GUI is still freeze. No exception behind and all threads are running. I can use some test script to control the GUI, but somehow it just never react to user click.
    Does anyone encounter the same problem and know the possible reason?
    Thanks!

    Hi motes_19:
    I have noteiced this as well in an application that I have created...however, my app doesn't freeze and the OS still runs (Win 2000). I suspect that your problem might be that you aren using the SwingUtilities.invokedLater() or SwingUtilities.invokeAndWait() methods to update your GUI. I am using them and still having some intermitten problems. Hope this helps you...if you have a solution for me, let me know.
    EH

  • How to customize URL in modal dialog script?

    Hi All,
    I am using JSLink to open Modal dialog, want to customize the url by adding '&DefaultView=Email' to URL in script. How to do this in below script:
    (function () {
    // Create object that have the context information about the field that we want to change it output render
    var pictureFiledContext = {};
    pictureFiledContext.Templates = {};
    pictureFiledContext.Templates.Fields = {
    //"Picture" is the column name.
    "Picture": { "View": pictureFiledTemplate }
    SPClientTemplates.TemplateManager.RegisterTemplateOverrides(pictureFiledContext);
    function pictureFiledTemplate(ctx) {
    var url= ctx.CurrentItem[ctx.CurrentFieldSchema.Name];
    var itemID=ctx.CurrentItem.ID;
    var itemTitle=ctx.CurrentItem.Title;
    return "<img alt='"+url+"' src='"+url+"' complete='complete' onclick=\"openModalDialog('EditForm.aspx?ID="+itemID+"','"+itemTitle+"')\" />";
    function openModalDialog(url,title)
    var options = {
    title: "Item-"+title,
    width: 600,
    height: 600,
    url: url
    SP.UI.ModalDialog.showModalDialog(options);
    return false;
    Thanks in advance!

    You should be able to do it like this:
    function openModalDialog(url,title)
    var options = {
    title: "Item-"+title,
    width: 600,
    height: 600,
    url: url + "&DefaultView=Email"
    Brandon Atkinson
    Blog: http://brandonatkinson.blogspot.com

  • How does EventQueue work with modal dialogs?

    Can anybody point me to some documentation/article/book etc. which thoroughly explains how exactly the EventQueue and EventThread work when a modal dialog is being opened? I assume dispatchEvent() for the event that opens a modal dialog does not return until the modal dialog is closed. If so, how are events handled while a modal dialog is open?
    I can't seem to find any book that goes into detail of these Swing/AWT internals.
    Thanks,
    -Martin Roth
    [email protected]

    The short answer is that a second event pump is created while the modal dialog is visible. The original event pump (which is different than an event thread) is indeed blocked until the dialog is closed. The code creating the new pump is in the java.awt.Dialog::show () method.
    The event pump is part of the java.awt.EventDispatchThread class.

  • Modal dialog - refresh the parent page on close

    Hi:
    Using Apex 4.02
    I have followied Havard Kristiansen's modal dialog example.
    I have everyting working, but I have a requreimet to refresh the entire page (parent page) on the close of the modal page.
    I have tried quite a few things in dynamic actions on the parent page etc, but nothing is working.
    How can I get the parent page to fully refresh when the modal dialog is submitted and closed.
    Your help would be most appreciated.
    Regards,
    Bruce

    Hi:
    Please - still waiting for help.
    Here is what I have tired:
    - dynamic action on iframe for page unload to call window.opener.doSubmit() and parent.doSubmit();
    - dynamic action on button on ifreame same as above
    - branch (plsql) process to call above
    None of these worked. The modal dialog closes but the parent page dos not refesh.
    I can refresh a report region, but the problem is that the region I want to actually refresh is conditional and is not displayed when you first open the modal dialog. Hence, it does not appear on the return even though the condition is now true.
    Any help would be appreciated please!
    Regards,
    Bruce

  • Modal dialog limiting the mouse pointer and blocking all application

    I wanted to create a modal dialog that blocks all application in my desktop. Only password field be present and exits only if correct password is typed. I also wanted to limit the mouse pointer within the window of the modal dialog. Will that be possible? i have read modality feature of Mustang(beta) and notes there that system modality is not included. Can anybody there give me an idea how to do tricks on blocking all applications of the desktop? I will be much grateful to anybody who could solve this problem. Thnx in advance...

    tnx Sarcommand ..i give up on that, i understand the risk if that feature is included..
    all i wanted is to make an internet cafe client/server that blocks the client's pc interaction if log time is reached.blocking only the keyboard and mouse.
    i have seen so many softwares sets the cursor position within the dialog bounding box only with user and password there. though my other application runs the mouse is still captured on the dialog even the dialog lost focus.
    if that would not be possible I'll just send notification to the client, a dialog that does not block any application.
    now, im going to try if the client can do som action whenever the server sends alert if the client java app is not the focus. i will post next time what hapens.but if you tried already, if u dont mind posting it so others could know it also..
    tnx so much Sarcommand..

  • Modal dialog missing the close button

    My AI extension (CS6) is set to be a ModalDialog (from the Bundle Manifest Editor UI Window Type).  It displays as a dialog correctly, but there is no close button in the title bar.  Is this something that needs to be done in code or am I missing something else?
    I don't mind adding my own close button in the dialog if I need to, but it seems the title bar close button should be there.

    Modal Dialogs have no close button.
    You need to add it yourself.
    Harbs

  • In Address Book, how to stop notes insert point jumping to the top? of the page

    Completely maddening thing that address book - and no other app I have ever encountered does, as you are typing information into the notes field of a contact, it will suddenly jump the cursor up to the start of the page, often leaving one word half finished and adding onto the front of some other bit of information is a totally crazy way.
    I use three Macs, all of them do it. Has anyone else encountered this?
    It seems to be since the ghastly faux leather Lion address book has been introduced, ( I assume Mr Jobs had nothing to do with that )
    Any ideas on how to prevent it happening?  Im not a touch typist, so I have to keep looking at the kbd, then I wont realise until half way through a sentence it has decided to split it in half and put some of it at the top of the page.  Crazy.    
    Thanks
    Stephen

    Completely maddening thing that address book - and no other app I have ever encountered does, as you are typing information into the notes field of a contact, it will suddenly jump the cursor up to the start of the page, often leaving one word half finished and adding onto the front of some other bit of information is a totally crazy way.
    I use three Macs, all of them do it. Has anyone else encountered this?
    It seems to be since the ghastly faux leather Lion address book has been introduced, ( I assume Mr Jobs had nothing to do with that )
    Any ideas on how to prevent it happening?  Im not a touch typist, so I have to keep looking at the kbd, then I wont realise until half way through a sentence it has decided to split it in half and put some of it at the top of the page.  Crazy.    
    Thanks
    Stephen

Maybe you are looking for