Window.open or window.showModalDialog question

I am creating a response window using window.showModalDialog.
The dialog has a Yes button and a No button.
If the user clicks No, I want to log them out.
BUT...here is my problem:
The user can click the X button in the upper right hand corner of the dialog. This will close the window, but will not execute the Yes code or the No code.
I tried adding a <body> tag to my JSP that says on the onUnload, execute the same function that is called when the user clicks on the No button. But I am using htmlb tags, and I don't think I can put in an extra <body> tag.
I tried, but my function is not executing when the window close (on the unLoad).
Can you create the dialog window without the X button?
Or...is there some way to execute code when using HTMLB that does the same thing as a body onUnload when using HTML?

Hi Eric,
You cannot create a window without the x button (this is a standard windows action).
Perhaps you can try adding the onUnload event in the BODY tag. If this does not work, try to catch the event.
Pls have a look at this code (the x button works in the example):
http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/events/onunload.asp
cheers,
Noel

Similar Messages

  • Issue in FF v 3.6.10: I have a page which have more than 20 link, clicking on these link opens up a popup using window.showModalDialog, for the first 20 popup opens up without any prob but for the 21st n more click it block the popup and do not open.

    Issue in FF v 3.6.10: I have a web page which have more than 20 link, clicking on each of these link opens up a pop-up using window.showModalDialog, for the first consecutive 20 popup opens up without any prob but for the 21st n more click it block the popup and do not open. This is m problem, the real user on the web page can click on more than 20 link in such a scenario it may create problem, please help

    Your above posted system details show outdated plugin(s) with known security and stability risks.
    *Shockwave Flash 9.0 r999
    Update the [[Managing the Flash plugin|Flash]] plugin to the latest version.
    *http://www.adobe.com/software/flash/about/
    In Firefox 3.6 and later versions you need the Next-Generation Java™ Plug-In present in Java 6 U10 and later (Linux: libnpjp2.so; Windows: npjp2.dll).
    http://java.com/en/download/faq/firefox_newplugin.xml
    See also http://java.sun.com/javase/6/webnotes/install/jre/manual-plugin-install-linux.html

  • CSV link doesn't work with popup created using window.showModalDialog

    From a data maintenance page, I allow users to view an audit trail of changes in a window which pops up using the window.showModalDialog method.
    In the popup page I have a download to CSV file link. When the link is clicked nothing happens.
    If I change the method to window.open the CSV link works fine.
    Any ideas?

    Thank you so much for your suggestions.
    I selected Convert RoboHelp Edited topics to HTML in both projects and recompiled them.
    I tested with Firefox 3.6 and 5.0.1 with the same maddening result: None of the linked topics popped up. Text pop-ups and See Also links continue to work. Everything works in Internet Explorer.
    The errors continue to be the same ones: "Permission dennied to access property 'whname'" and "Permission denied to access property 'document'".
    My next step is to test it from a server, but that, of course, requires others to assist.
    Have you heard of such a problem before? Do you have any other suggestions?

  • Problem using window.showModalDialog in  Internet Explorer7

    hi,
    can any one tell me the issues related with <b>window.showModalDialog</b> and Internet Explore 7 as i am getting error when i am trying to log out a page where i am using ShowModalDialog
    Thanks

    Hi Abhai,
    Please find the reg file searching "ie6sp2" in google. Download  and apply it on your computer and  then try to see <b>window.showModalDialog</b> .I think reg file should fix your problem.
    Regards,

  • When Java applet invokes JavaScript which executes window.showModalDialog, get popup with about:blank

    When using a Java applet that invokes a Javascript function that in turn calls window.showModalDialog, a pop-up dialog that only contains "about:blank" results. Selecting "show desktop" from the Windows 7 taskbar and then viewing the FireFox window results in the true dialog content being displayed. Everything worked properly until very recently (and old versions of FireFox work) and I suspect something was changed in FireFox as a result of the recent Java security failures.

    Hello, I don't know about this specifically but this is what I would try.
    Instead of the string "\u7834\u70C2\u7269\u7A0B\u5E8F\u5458..."
    Set the encoding type in the String constructor first...
    ie:
    new String( "\u7834\u70C2\u7269\u7A0B\u5E8F\u5458...","GB18030");
    Here is a little class I whipped up to show the CharSets that are available to you..
    public class ShowAllCharSets
    ShowAllCharSets()
    Map myMap = Charset.availableCharsets();
    Iterator iterator = myMap.keySet().iterator();
       while (iterator.hasNext())
          System.out.println("Char set name = "+((String)it.next()));
    public static void main(String args[])
       new ShowAllCharSets();
    }Then use the preset charset String with the specific encoding already set for your menu items.
    GB18030 I picked arbitrarily because it is Chinese and you may have to try another.
    Good Luck!
    (T)

  • Firefox 3.6.18 is causing the webpages to bounce (or shake) up and down. Oddly, this doesn't happen if I open your "Ask a Question" page in another tab. Then the webpages in all the tabs stop shaking/bouncing.

    I just downloaded and installed version 3.6.18. The web pages that are displayed shake (or bounce) up and down. Oddly enough, when I open your "Ask a Question" feature in another tab, the problem stops. But only as long as I keep that particular tab open.
    I am running an eMachine T2245 with Windows XP using SP2. I have numerous add-ons, including Flashblock, 1.5.14.2, KeyScrambler 2.8.0.1, MultiRow Bookmarks Toolbar 5.0.1, NoScript 2.1.2rc4, and Tab Mix Plus 0.3.8.6.

    I found a "work around". I installed Incredible Bookmarks 0.7.3. That allows me to add an additional Bookmarks Toolbar without causing the bouncing problem.
    Putting bookmarks in the IB bar was a little tricky. It allows customization, but only to the extent of choosing bookmarks by topic or by a subdirectory of the Bookmarks Menu. What I actually put on the toolbar are such subdirectories (or folders), so I normally could only put one at a time. (This problem doesn't exist with the Firefox Bookmarks Toolbar, which allows you to copy subfolders, not just individual bookmarks).
    I solved the problem by moving the additional folders I wanted to put in the IB Toolbar into a folder I (cleverly) called "IB Toolbar", then selected that for the actual Toolbar. The result: a row of folders, exactly what I wanted. (Actually, it's a second row of folders, since I still have the original Firefox Bookmarks Toolbar.)
    I'd still prefer MultiRow, but that doesn't appear to be working with Firefox 3.6.18 and higher, so until I upgrade to Firefox 5 (and see if the Plus version will work) this will have to do.

  • I want to send a normal pages document as a attachment to someone (non Mac PC). How do I convert the file so they can open it? Silly question but I'm new to Mac.

    I want to send a normal pages document as a attachment to someone (non Mac PC). How do I convert the file so they can open it? Silly question but I'm new to Mac.

    A Pages (.pages) document is only viewable with Apple's Pages application on the Mac, or via Pages for iCloud beta. You should export it to either MS Word (.doc/x) or PDF. The Share menu will let you do this directly into a Mail attachment.

  • Why isn't adobe reader opening? Please answer question as fast as possible.

    Why isn't adobe reader opening? Please answer question as fast as possible.

    Well the app must have worked at one point if you have important data in it. Maybe you should seek help on the Adode Reader for iOS web site.
    http://forums.adobe.com/community/adobe_reader_forums/ios
    Have you rebooted the iPad and then tried the app again? Reboot the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider if it appears on the screen - let go of the buttons. Let the iPad start up.

  • Terminal: "open -e/t" question.  Windows group question

    2 questions regarding Terminal
    1. Is it possible to make it so the open -e, or open -t command, instead of opening TextEdit, opens a different text editor?
    2. Is it possible to open a Windows group, and have JUST 1 of the windows execute an ssh command?

    1. Is it possible to make it so the open -e, or open -t command, instead of opening TextEdit, opens a different text editor?
    Sure. 'open -t' uses the default text editor application, as defined by LaunchServices. On a standard system this is TextEdit.
    If you want to have 'open -t' use a different TextEditor then you need to specify an alternative application as the default text editor.
    This is easiest done by selecting a plain text (.txt) file in the Finder and choosing File -> Get Info. In the 'Open with' pane you can choose an alternative text editor and clicking the 'Change All' button will update the LaunchServices database with the specified application as the default.
    Now any .txt file you open will launch in this application, whether it's opened in the Finder, or via 'open -t'.

  • Open Browser window behavior question

    I have linked files set to open in a 600x700 browser window when an image is clicked. Everything works fine, but when my cursor is over the image, there is no icon (cursor doesn't change to a hand) that indicates a linked file to the user. How can I fix this?
    You can see the page here.

    Add a CSS style for images
    cursor:pointer;

  • Window autosizing question

    Hello! I have a question:
    When dialog window opens (action="dialog:someWindow") and size parameters is not set, window size calculates automatically. I have a page, which opens in dialog mode:
    <af:commandButton text="Show panel grid" actionListener="#{backing_dialog_window.actionShowPanelGrid}"/>
    <h:panelGrid columns="2" width="100%"
    columnClasses="columnLeftAlign30,columnLeftAlign70"
    rendered="#{backing_dialog_window.act == 1}">
    ... some content
    </h:panelGrid>
    public void actionShowPanelGrid(ActionEvent ev) {
    this.act = 1;
    When I press button, method actionShowPanelGrid sets act equals 1, panelGrid becomes visible. I should increase page height. How can I calculate it? The better way to solve this problem is call some function, which resizes this window automatically. How can I do this?

    When working with javascript in multiple windows like this, it is very easy to get lost.
    I think what you missed in accessing your applet was a "document" object.
    There are a couple of hints for writing javascript:
    1 - you can type javascript into the address bar like so:
    javascript:alert(window.opener)
    You then follow the path to the object you want as long as you can. Build it up slowly, so you see where the chain breaks.
    javascript:alert(window.opener.opener)
    javascript:alert(window.opener.opener.document)
    javascript:alert(window.opener.opener.document.applets)
    javascript:alert(window.opener.opener.document.applets.length)
    2 - General design: Don't reference stuff on other pages - call functions on the page only.
    Rather than calling window.opener.opener.document.applets[0]. (ie referring to the applet from window 3)
    do this
    window.opener.opener.saveApplet() (from window 3 call the saveApplet function on window1)
    and on the first page have
    <script>
    function saveApplet(){ 
    document.applets[0]. ...
    </script>
    This provides a sort of interface for other pages to use, so they don't have to refer to details on the page.
    If you change the layout of the page, or the name of the applet etc etc, you only have this one place to modify it. It can save you a nightmare in javascript errors later on.
    Good luck,
    evnafets

  • Y410 Windows 8 Questions

    I have searched around the internet and played with options on my computer but I have not solved my issues. I am looking to change the sensitivity of the trackpad along with get rid of some of shortcuts (sliding from the left to the right on the left side in particular is very annoying). There are also occasions where my computer shows me connected to the internet, but it will not load pages. I am also looking to set the windows key to open up "Pokki" (if that is possible/another application similar to it). I am new to the Lenovo community but I am loving my laptop (minus some parts mentioned above) and I appreciate all assistance!

    Not sure what you mean. I thought it did.
    The blog post says
    Go to adobe website and look for an update to your version of adobe Photoshop, find it. It probably is name as “Application Patcher.”
    Download the Adobe Photoshop update file (Application patch).
    So I gave you a link to the only update available for CS3.
    thatdesignkid wrote:
    My last little side question is, if i run a trial version of Windows 8 on my computer, will it be an accurate representation of how it will really be if I install Windows 8 and reinstall the CS3?
    Yes.

  • Windows Login Question

    Hi! I know i'm missing something simple. On some 10.4 servers that I'm running (10.4.0, 10.4.5, 10.4.6) when a Windows user tries to connect, they don't get the login window. The servers are all OD masters, not PDC, no AD anywhere, standalone server as far as windows in concerened. No firwall issue (everything behind the firewall)
    The users can see the sharepoints, but can't connect, we can't even get the log in winodw under windows. Mac users can connect just fine uning SMB.
    What the heck am I missing??
    thanks

    The minimum number of elements needed to allow users with Windows to connect to a 10.4 server are:
    1 server
    1 Windows client
    In your post, you stated you had more than one server and more than one OD master, no Active Directory and no Primary Domain Controller.
    Additionally, your post implies you are wanting your Windows clients to log into a Domain and possibly have automounting directories. I will cover only the basics. After you get this working, move to the next step and ask a more defined question, such as How do I set up home directories for Windows clients? Group folders?
    If you are wanting to log into a domain, please read the following Apple document:
    http://docs.info.apple.com/article.html?path=ServerAdmin/10.4/en/c2wn3.html
    This will help with setting up your PDC.
    Using OD requires a knowledge of directory services planning. While it is OK to run more than one OD master, you should have a clear understanding of which clients and servers are covered by each OD umbrella.
    For your problem, and to give you an answer that may help, I will give a scenario of one OD server and one additional server that is covered by that OD master with one Windows client. All of which are on the same subnet.
    The basic steps that you'll need to follow are:
    - Set up Open Directory as a master on one server with connectivity to clients and sharepoints
    - Set up users within OD.
    - Set up a second 10.4 server as an OD replica - REMEMBER 10.4 to 10.4 with OD. OD will not replicate backward or forwards, i.e. 10.3 to 10.4 = no, no. This server will also serve your share points.
    - Set up share points on the second server that is bound to your OD master.
    - Test with Windows client.
    When you try to connect to a share point on a Mac OS X server, your users are authenticating against a directory service. That directory service can be the local repository on the server or the OD database. It is wise to use the later with Workgroup Manager, otherwise you'll be creating a mess of user accounts all on different servers through the Accounts preference pane and is not the recommended method - even if you're talking about only 5 users. This WILL cause problems with file sharing (UID's, etc)...as well as allow each of those defined users to directly log in to the server if they have access to it.
    On the server holding your share points, you will need to turn on the Windows service.
    With Workgroup Manager, connect to the server that holds the share points to be shared.
    - Click on Sharing
    - Select the folder that you want to share. If you do not see it available (the problem may be here), click on All and locate the directory, if needed.
    - On the General tab, click "Share this item and its contents".
    - On the Access tab, select the owner and group - I will not go into PHD's or the like, but there's much to read about this. This is where OD comes into play and be sure you are selecting users from the OD service that is housing the Windows user. Above the user list, you should see Directory: /LDAPv3/127.0.0.1. Authenticate to the directory as the Directory Admin.
    - On the Protocols tab there is a drop down list that allows specific modification to the directory's access. The Windows File Settings are the point of interest. Be sure the folder is being shared via SMB and provide a name that is within your share point model.
    At this point, you should be able to touch the folder with the Windows client via IP or the name that you created on that server.
    Now, here are Apple's instructions:
    Setting Up a Share Point for Windows Access
    Using Workgroup Manager, you can allow Windows clients to access an existing share point via the standard Windows file sharing protocol, Sever Message Block/Common Internet File System (SMB/CIFS). You can optionally allow or disallow Mac OS client access via Apple Filing Protocol (AFP), UNIX client access via Network File System (NFS), and mixed client access via File Transfer Protocol (FTP). Workgroup Manager enables sharing via SMB/CIFS, AFP, and FTP by default for every newly created share point.
    Open Workgroup Manager and click Sharing.
    Click Share Points and select the share point that you want to configure.
    Click Protocols (on the right) and choose Windows File Settings from the pop-up menu.
    To provide SMB/CIFS access to the share point, select "Share this item using SMB."
    To allow unregistered users access to the share point, select "Allow SMB guest access."
    For greater security, don't select this item.
    To change the name that clients see when they browse for and connect to the share point using SMB/CIFS, type a new name in the "Custom SMB name" field.
    Changing the custom SMB/CIFS name doesn't affect the name of the share point itself, only the name that SMB/CIFS clients see.
    Select "Enable strict locking" to have clients use standard file locks with a share point that's also accessed by protocols other than SMB/CIFS.
    Do not select "Enable oplocks" for a share point that's using any protocol other than SMB/CIFS. For more information on oplocks, see File Locking With SMB/CIFS Share Points.
    Choose a method for assigning default UNIX access permissions for new files and folders in the share point.
    To have new items adopt the permissions of the enclosing item, select "Inherit permissions from parent."
    To assign specific permissions, select "Assign as follows" and use the Owner, Group, and Everyone pop-up menus.
    To prevent AFP access to the share point, choose Apple File Settings from the pop-up menu and deselect "Share this item using AFP."
    To prevent FTP access to the share point, choose FTP Settings from the pop-up menu and deselect "Share this item using FTP."
    To prevent NFS access to the share point, choose NFS Export Settings from the pop-up menu and deselect "Export this item and its contents to."
    Click Save.
    Windows services must be running to provide SMB/CIFS access to share points. For instructions, see Starting Windows Services.
    For additional information, see Managing SMB/CIFS Share Points and the share points section of File Services Overview.
    I hope this helps.

  • (Mountain)Lion Window Manager Questions

    I've written a couple apps for iOS, but nothing major. And now I have a goal of writing my own window manager for OS X. Mainly because I find developing in XCode painful after using Windows Aero/Snap features. Yes, I know about several good existing window managers, but this project seems like a good way to get my feet wet in the Apple OS development arena. I've been Googling around for about an hour looking for answers to these questions, but I'm still not 100% sure on any of them. Here goes:
    What is the name for the default Lion / Mountain Lion Window Manager?
    X11/Quartz can be restored in 10.7+ to run "legacy" OS X apps. Does that have an effect on the existing window manager?
    Are there any open source projects that I could look at to get a handle on the concepts behind the Mac OS X 10.7+ system management?

    Roguish wrote:
    Why not? I know tons of stuff applicable to Windows, I'd like to know more about Mac OS.  And the best teacher is experience in my opinion.
    But writing something like a window manager is hard. Wouldn't you rather start off slowly?
    "Snap" is a rather convienient window resizing feature of Windows 7.
    I have Windows 7 for running IE 9 to test web sites. It is dog-slow to I avoid it whenever possible.
    XCode isn't my problem, the minimalistic window controls in Mac OS X are my problem.  But I only have to deal with them in an irritating fashion when I'm coding in XCode
    Xcode is pretty-much an all-encompassing environment. You should only have one Xcode window open. Source files are in the editing pane.
    I just didn't want to start a flame war over operating systems.  I personally don't have an OS preference; if an application I need is only on Mac OS then I'll use Mac OS, if I need to write a document I'll use Word in Win7, if I need to rapidly prototype a script for research purposes I'll use Ubuntu.
    This is not Ars or Slashdot. This is Apple-land. Macs rule - end of story. If you try some Mac apps, you might find that Pages does anything Word does three times faster and OS X does anything Ubuntu does, only better.
    It's a free country.  Could you suggest a better one besides the developer tutorials in the Mac Developer Library?  I've written a couple drivers using it, but I can't seem to find the correct wording to locate the current topic in there.
    No, it isn't. As I said above, this is Apple-land. You asked about a good project to get your feet wet in the Apple OS development arena. Anything involving X11 would be a very poor project for that purpose because it would not teach you one thing about Apple OS development. If you want to learn about X11, then do something in X11. If you want to write a Mac application, then do that.
    Really? What would you call Mission Control then (I finally succeeded with Google)?
    You are talking X11-isms. You aren't going to replace Mission Control.
    How about Inkscape, the free SVG editor?  Which is still in active development.  And as of this post requires Quartz to create an X11 window to run in.  I'm sure they'll get to updating it eventually, but until then I'd rather not shell out for Illustrator just to make SVG's quickly.
    Adobe is not really a Mac development house anymore. They just churn out ugly, expensive cross-platform bloatware. Adobe's idea of an icon is a square with an "A" in it.
    If you are looking for quick and easy to use vector drawing tools, the Developer forum might not be the right place to ask. I use Logoist. It's not free but I can create documents faster than you can download and launch Inkscape.
    Or maybe you just aren't familiar with what "Window Manager" means.
    I know what a "Window Manager" is. If you want to ask something specific, please do so.
    I want to code an application for OS X that would allow me to very quickly resize the active window to take up the right half of my screen by pressing command+<right arrow> (or something similar).
    Was that so hard?
    The only shortcuts similar to what I want (that I use) are command+m (minimize) and command+<down arrow> (open current selection using the default app). Three existing window managers that I know of that seem promising and have nice feature sets are SizeUp, Cinch, and Optimal Layout.  But as I mentioned earlier I want to code it myself. As an exercise. To learn.
    You could cobble together some AppleScript such as you have already posted. However, that isn't going to teach you anything about OS X development either.
    Next time could you be a little less smug (and a lot more helpful) when replying to an obviously new member to the forums?
    Only if you meet me halfway. What kind of welcome would I get if I showed up in a Windows forum asking how I could learn about .NET by writing a Linux device driver? And then, for good measure, I call Visual Studio painful because it doesn't support some Mac features that Windows users have never heard of.
    This is a different world. There are no window managers and there never have been. Asking about X11 in OS X is like asking about DOS development in Windows. Sure, there are some people who still do that stuff, but I would never suggest anyone start there. X11 is just part of the UNIX compatibility layer - a foreign add-on. Most of the open source is in that layer too. If by "open source" you mean "free software", you should know that free software is pretty much incompatible with the Apple ecosystem and not by Apple's decision.
    I suggest you start by writing some applications. Use the Xcode project templates in File > New > Project > Cocoa Application. If you want to start on the command line, do File > New > Project > Command Line Tool > Foundation. Get used to Cocoa and Objective-C.

  • I am a new user of Mac after many years of Windows my question is What am I doing wrong:

    I am busy working when the rainbow wheel comes up as would the spinning mouse on windows, I then have to wait for the rainbow to disappear ie the program to catch up before I can continue. It is brand new machine and shouldnt yet be bogged down.
    I have to say at this point in time I am not sure that I have made the right move.
    I have installed Mac Office as that is what I have used for many years, so firstly I thought there was a confliction with mail and Outlook as window users know that has been an issue with windows in the passed so I have uninstalled Outlook so as not to duplicate. I have cleaned the calender and contact with downloaded  Mac Apps. I am now at a loss what to do next because this isnt a spedy machine. Its a 2.9 HGz Quad core i5 so no light weight my old Dell is a Quad and still has enough speed to keep up with me and is 4 years old. So y only thought left there must be another confliction. Please advise as I am not completly in the know as I would have been with the Windows

    As to any conflict between 2 different program that do the same thing and are installed on the same computer at the same time there simply isn't any unless both programs are running at the same time and trying to access the same file at the same time. That is except for AV software that runs all the time.
    So having MS Office Outlook installed and Mac "Mac Mail" there shouldn't be any conflict at all. Even if you were to run them at the same time. They are both just Mail and contact programs, in the case of Outlook. They would both just go out to your Email account servers and download the available mail on those servers. One doesn't interact with the other. They just interact with your email account servers, which may cause a conflict on the server but not on the computer.
    On my Windows computers I have 2 CAD programs installed, Autocad and Visual Cadd, and run them both at the same time. No conflicts between them as long as I have different CAD drawings open in each. If I try to open the same drawing in each program the program will popup a warning that the files is in use by another program and it willl be opened for Viewing Only or not opened it at all.

Maybe you are looking for