popUp2 vs window.open

Hi guys,.

I'm developing windows pop up in my application. I see a lot of devs using window.open for this function. My old applications use rather popUp2 function. Both work fine, however I have not found any documentation on popUp2.

The question is what is the differece between these methods and which is recommended to use?

Thank you

Elena

PopUp2 is legacy.js:

/**
* @deprecated
* @function
* */
function popUp2(pURL,pWidth,pHeight) {day = new Date();pName = day.getTime();html_PopUp(pURL,pName,pWidth,pHeight);}

As you can see, it is marked with "obsolete", then you should not use it. It uses html_PopUp:

/**
* @deprecated Use apex.navigation.popup
* @function
* @param pURL
* @param pName
* @param pWidth
* @param pHeight
* @param pScroll
* @param pResizable
* @return {Window Object}
* */
function html_PopUp(pURL,pName,pWidth,pHeight,pScroll,pResizable)

Also deprecated. Fortunately, it offers the alternative apex.navigation.popup

Unfortunately, namespace navigation is not one described in the online documentation. It seems strange that popup.close could be documented, and not the logon method, but the file has no documentation either (again, even if it is the tag TODO).

If you are uncomfortable with javascript, you can dive into the library file, found in the images folder: images\libraries\apex\navigation.js

Here's what it does:

    /**
     * @TODO Add documentation
     *
     * @function popup
     * @memberOf apex.navigation
     */
    navigation.popup = function ( pOptions ) {
        var // Initialize default parameter values
            lOptions = $.extend( {
                            url:        "about:blank",
                            name:       "_blank",
                            width:      600,        //min value 100
                            height:     600,        //min value 100
                            scroll:     "yes",
                            resizable:  "yes",
                            toolbar:    "no",
                            location:   "no",
                            statusbar:  "no",
                            menubar:    "no" },
                            pOptions),
            // Open the new window with those parameters
            lWindow = window.open(
                lOptions.url,
                lOptions.name,
                "toolbar="      + lOptions.toolbar      + "," +
                "scrollbars="   + lOptions.scroll       + "," +
                "location="     + lOptions.location     + "," +
                "statusbar="    + lOptions.statusbar    + "," +
                "menubar="      + lOptions.menubar      + "," +
                "resizable="    + lOptions.resizable    + "," +
                "width="        + lOptions.width        + "," +
                "height="       + lOptions.height
            );

        if ( lWindow.opener === null ) {
            lWindow.opener = window.self;
        }
        lWindow.focus();
        return lWindow;
    }; //popup

So how do you use it? Look at the lOptions object, and you know what parameters it can work with. A call for example for the popup would be:

apex.navigation.popup({url: "f?p=500:1000", width: 500, height: 600, resizable: "no"});

It is certainly more flexible than PopUp2!

Also note that navigation.popup returns a reference of 'window' to the created window. You can store this reference to manipulate or something.

Another interesting thing is that this call will set the variable "opener" on the window to the parent window. This allows you to use

window.opener

refer to the parent page.

That's the difference. On those, it's reasonable to use apex.navigation.popup. If you want to use window.open, it's fine. They call them he and window.open is the native javascript of course method. But navigation.popup provides some additional features, unless you want to develop a second time or have very specific needs, it might be the way to go.

Another option is by looking at the modal windows - but it depends on what you actually do on the indicated page. Modal windows with iframes of them can look very good, don't open additional tabs or windows and are not blocked by popups blockers. They feel more like an extension of the application only one pop-up window. You'll need some javascript wiz to use well. A good modal plugin page is the page modal plugin skillbuilders, something you can take a look at. There are many examples out there!

Tags: Database

Similar Questions

  • new windows open randomly - even when you're far away computer

    Firefox open new windows at random, but a new window every 30 to 60 minutes. happen without user input - even when the screen is locked - when I unlock the morning on 10-20 new windows opened.

    --
    new installation of arch linux with only a few packages of basic installed so far. Firefox 41.0.2. report on health enabled. occurs with disabled modules, only one tab empty open in firefox, and no other applications running.

    solved: a new window opens every 61 minutes was due to a package: profile-sync-demon, I went back to the old version (5.75) and all is well now.

  • the opening this window opens chrome://alotabgen/content/alottb-widgetWinError.html

    Why this window opens every time that I run Mozilla

    Start Firefox in Safe Mode {web link} by holding down the < shift >
    (Mac options)
    key and then from Firefox. Is always the problem?

    Favorite and use this.
    Download the Mozilla search reset {web link}
    This module is very simple: when installing, it backs up
    and then resets your search and home page preferences
    at their default values and then to uninstall. This
    affects the search bar, search bar URL, and the home page.

  • Window.Open is not supported by 40.0. + (39.0.0 and below of), can this please be corrected?

    I often visit websites that will be, when the user clicks on a link or an action takes place, a new window will appear with the contents of the URL or the desired action (as when you pay a bill it is redirect to another provider who then handles the transaction). A few days earlier, I tried to pay a Bill and Firefox gave me a blank window but inspect 'command-u' shows that the HTML is there. When I did it through Safari, it worked. Today, I wanted access to a ProQuest database via a link provided by the UCLA Library and I got the same result: an empty window with HTML code appears when 'command-u' is used. Surprisingly, paste the link in a new browser window did produce the content. But the original empty browser window not showing anything even if it is re-charge. Both of the actions that I describe are produced by scripts on these two very different sites, but Firefox response is the same: a browser window empty.

    To isolate it, I tried the simplest: I used window.open in my work site to send the visitor to the Publisher of origin of my work. The following code snippet is an example of this approach:

    "" < a href = "http://link.aps.org/abstract/PRL/v72/p1658"

        onclick="window.open(this.href);return false">original publication</a>.
    

    By clicking on the link used to open a new browser window at aps.org.

    But now it does not after the upgrade to 40.0. + (currently at 40.0.3).

    It is, as far as I know, a call HTML "supported". And it works for 39.0.0 up to 34.0.5 (could have been furtherback, but I don't see the point).

    I think that it is a major flaw with 40.0. + and must be fixed as soon as possible.

    Thank you for reading this far.

    (This post was made from a Mac Pro [Xeon], kept at 10.6.8 for complex reasons. But the results are identical to the terms 10.10.3 elsewhere.)

    Start Firefox in Safe Mode {web link} by holding down the < shift >
    (Mac options)
    key and then from Firefox. Is always the problem?

    In the address bar, type Subject: preferences #content< enter >
    Search for block windows blocker. To his right, press on Exceptions.

    Do the same for any program blocking / modules.

  • Adblock Plus is originally an extra window open when I click on a link from Apple Mail.

    When I click on a link from Apple Mail, an (empty) additional window opens. The problem seems to be related with Adblock Plus, because it happens when Adblock Plus is removed. Problem, all started yesterday (7/29).

    This only happens with AdBlock? Very strange. AdBlock to block pop-ups.
    Is there anything in the address of this window box?
    It's on a website, several?

  • When I open a new tab, a new window opens

    I used to be able to open multiple tabs in the same window of Firefox. Now, every time I click on a link or access an external link hyper, a new window opens instead of a new tab in the existing window.

    Browser.Link.open_newwindow has the value of integer type and a value of 3.

    It seems not to matter. The problem persists. I don't want to do a refresh or uninstall and reinstall a new copy. What can I do to fix this? As I said, it has never been this way before and it seems to have started to happen out of nowhere.

    Try to set browser.link.open_newwindow.override.external 3 as well.

    Have you checked your extensions (associate tab)?

    Start Firefox in Safe Mode to check if one of the extensions (Firefox/tools > Modules > Extensions) or if hardware acceleration is the cause of the problem.

    • Put yourself in the DEFAULT theme: Firefox/tools > Modules > appearance
    • Do NOT click on the reset button on the startup window Mode safe
  • I go to a site, a new window opens, I am warned against a virus and sindou a # 1-855 = 232-1535 for instructions. Is - is this legitimate?

    I go to a site and do a search for an mp3 player. A new window opens and I get a recording of the voice tells me I have a virus and I need to call this number 1-855-232-1535 and I will be given instructions on how to to remove the virus or my personal information could be compromised... My antivirus can't find no viruses nor did my malware program. Is a warning and a number legitimate (I called and had someone who doesn't tell me just who the support she represented and was obviously, probably in India and Pakistan and also of course in a piece of phone). Any comments would be appreciated.nI running windows xp service pack 4 and FireFox 38

    Hi, probably the site it is a phishing site, forge, if you are looking for the virus and you are clean, if you want to check more then, you can try these free programs to search for malicious software that work with your existing anti-virus software:

    Microsoft Security Essentials is a good permanent antivirus for Windows 7/Vista/XP, if you do not already have one. Windows 8 already has integrated antivirus.

    https://www.Google.com/SafeBrowsing/report_phish/

    Thank you

  • New private window opens in pop up windows

    -Navigation in a private window
    -Parameters are set on... Open the link in a new window (which should be a new private browsing window)
    -I click on the link on a site
    -New private window opens the link in a pop-up window with no bar to scroll/bar menu/bookmark bar/etc... I can maximize the size of the window, but have no way to see the bottom of the page... [See attached snapshot]

    NOTE... it shows at the top of this capture, private browsing... The bookmark bar of menus/scrollbars bar have disappeared, that the capture is a pop up... He's supposed to be a new web/window private browsing page.

    -C' is definitely a bug in the last update.
    -using the worm 38.0.1
    -Navigation in a normal window works fine... this link opens in a new window fine, as is expected. , but something broke when browsing in private windows.
    -Reset of mozilla has not fixed the problem.

    This is a known bug in Firefox that is known by some, but not all, users. It can be bypassed by following these steps:

    1. Go to Subject: config and click on the warning message.
    2. In the search at the top of the page box, type the text dom.disable_window_open_feature. Wait a few seconds for the filter takes effect or press ENTER.
    3. Double-click one of the listed values that have a value of False to change to True.
    4. Close the tab when you're done and that the problem should be solved!

    Source: https://support.mozilla.org/en-US/questions/1062333?page=2#answer-732589

  • Use F'fox on Windows 7, when I have several windows open, why the relative location of these windows in the taskbar sometimes change?

    In general, I have three windows open Firefox, each with several tabs. Firefox itself is pinned to the Windows taskbar. Some of the tabs are set to reload.

    The behavior that I find strange is that the window that initially had the means of the taskbar sometimes migrating to the first position. This behavior can be controlled, or the less predicts?

    Thank you

    Hi Avocet,
    I guess this change because it's the last window to load a new page or which has been highlighted. If this happens on one of the tabs autoload, that might explain it.

    It seems that the other had the same question and had a tweak of operating system: http://superuser.com/questions/680406/how-to-order-windows-of-the-same-pro...

  • How can I stop Firefox closes when I close the last window open?

    I had to get Windows 7 reloaded and my backup was corrupted (i.e., I couldn't use my custom Firefox.) So I downloaded the new Firefox and now it closes automatically when I close the last window opened. I prefer that Firefox stay open until I chose to close it. How to achieve this?

    Hello 1DKG, do you mean when you close the last open tab? If yes you can replace it as follows:
    enter on: config in the address bar of firefox (confirmed the message information where it appears) and search for the preference named browser.tabs.closeWindowWithLastTab. Double-click it and change its value to false.

  • Given that I put to update to the latest version of firefox, whenever I click on a link or in a box a google play window opens

    Since I have updated to the latest version of Firefox a few days every time I click on a link, or in a dialog (like this one) or try to pin something to Pinterest, a reading of google window opens. I have no new pluggi-ns and no Add-ons. I also scanned my cpu for viruses and none were found. What is originally this issue that drives me crazy, and how can it be solved?

    To eliminate if it is a corrupt add on or plugin, please check if it happens in a new profile with just the pintrist on. This will tell you if it's a combination. Use the Profile Manager to create and delete profiles Firefox

    Also sometimes an antivirus does not detect a virus that would be another. Sometimes a problem with Firefox can be a result of malware installed on your computer, you may not be aware of.

    You can try these free programs to search for malicious software that work with your existing anti-virus software:

    Microsoft Security Essentials is a good permanent antivirus for Windows 7/Vista/XP, if you do not already have one.

    More information can be found in the article troubleshooting Firefox problems caused by malware .

    This solve your problems? Please report to us!

  • a window opens but is empty

    When I try to open Firefox, a window opens but it is all black with a green stripe at the top. No toolbar or the controls are visible to reduce, max or close other then. Uninstalling and reinstalling firefox did nothing. System Restore did nothing. I still have access to the internet using another browser, but I never use firefox and hope I can get it back! I've also tried going to start firefox.exe - p, but that box pop up is too just black. I ran my Norton full scan & it says no threat detected. I am at a loss. Any help will be greatly appreciated!

    Hi, here is a how-to by intel for know that you are using: http://www.intel.com/support/graphics/sb/cs-009482.htm

  • How can I delete the history, except the tabs and windows open?

    Hi, I don't find a way to remove all my firefox history, except the tabs and windows open.
    I couldn't find any solution on the Web. I have tried almost all the settings in the privacy settings, nothing works. any ideas how to do that, or maybe suggestions for Add ons?

    As long as you clear the history manually and not through 'Clear history of Firefox closing' then you must keep open tabs and windows.

    Firefox creates a sessionstore.js file in the Firefox profile folder?

    You can check the prefs of . browser.sessionstore * including browser.sessionstore.resume_from_crash on the topic: config page and reset the browser.sessionstore prefs that are correct (in bold) user via the context menu in the default value to make sure that the Session Restore is enabled and functional.

  • El Capitan calendar window opens the mosquito net

    As one of the last updated at El Capitan, whenever I run the application calendar, the main window to open just half of the screen. Incredibly annoying when you are in month view. I tried to resize and then quit calendar in the hope that it would enter the window location, but it did not help. The next time I run the application calendar, the main window open covering just half of the screen.

    Am I the only one having this problem?

    Drag the largest window in any corner.

    If you are out of fashion full screen (Control F)

  • to stop multiple spam windows open when I click on a link

    All of a sudden when I click on a link all kinds of spam windows open. I have 'Pop-up' windows defined on off... but, they always open... also suddenly online pages will have tons of highlighted words hough, they are links... and when I click on them, thinking that it is a link that's another annoying pop-up window. I checked my "plug-ins" and "add ons" and there is nothing I can find. I use Windows 7 and this problem just started this week. I performed a McAfee scan and found no virus... can help you?

    These files are not supposed to be deleted. Quite possibly user.js (thanks for the heads-up jscher2000 on hidden file extensions. A movement bonehead by Microsoft) had a content in it that made all these pop-up windows. The user.js file is not there by default unless you did so it is safe to delete it.

    Regarding the .json, those required by Firefox files. More information about the files in the profile folder can be read using the link below

Maybe you are looking for