- SAS e-Learning: Enabling Pop-Up Windows and JavaScript
- Enabling Pop-Up Windows
- Enabling JavaScript or Active Content
- Disabling Ad-Blocking Software
- Configuring your web browser to allow pop-up windows
- Safari (macOS)
- Chrome .current (Windows/macOS)
- Firefox .current (Windows/macOS)
- Internet Explorer (Windows)
- Edge (Windows 10 only)
- How to Enable Pop-Up Windows in Web Browsers?
- How to Enable Pop-Up Windows in Web Browsers?
- Working with Pop-up Windows
- Table of Contents
- How should pop-up windows display?
- How to open a popup window
- with a standard hyperlink tag
- with JavaScript functions:
- with HEScript
- How to close a popup window
- How to modify a popup size/position, set the focus…
SAS e-Learning: Enabling Pop-Up Windows and JavaScript
To view SAS e-learning, you must allow both pop-up windows and JavaScript (a type of «active content») in your browser. To do so, you may need to disable software that blocks pop-up windows or ads.
Enabling Pop-Up Windows
You might be unable to view pop-up windows for either or both of these reasons:
- pop-up blocking in your browser settings
- pop-up blocking software that is installed on your computer.
If you cannot view pop-up windows, perform one of the following actions as appropriate:
Disable pop-up blocking software.
Turn off pop-up blocking in your browser.
For example, in Internet Explorer 11.0, you can select Tools > Pop-up Blocker > Turn Off Pop-up Blocker .
Allow pop-up windows from the Web site where you are taking SAS e-learning.
If you prefer to keep pop-up blocking turned on, you might still be able to allow pop-up windows from specific Web sites. For example, if the pop-up blocker is already turned on in Internet Explorer 11.0, you can select Tools > Pop-up Blocker > Pop-up Blocker Settings and add *.sas.com as an allowed site for pop-up windows.
Enabling JavaScript or Active Content
In most current browsers, JavaScript or «active content» is enabled by default. If JavaScript is turned off in your browser, follow your browser’s directions for enabling JavaScript. For example, in Internet Explorer 11.0, you can perform these steps to enable active content:
- From the browser menu, select Tools > Internet Options and click the Security tab.
- Click Custom level .
- Scroll to the Scripting section (near the bottom). For all of the listed scripting settings, select Enable . Click OK .
- In the Warning! window, click Yes .
- Click OK .
- Refresh the browser (select View > Refresh ).
Disabling Ad-Blocking Software
Some ad-blocking software may also interfere with JavaScript in your browser. If you cannot see navigational elements such as back and next buttons on lesson pages, check to see whether you have ad-blocking software turned on.
Ad-blocking software may be activated directly or through security software. For example, you may have Ad-Aware software running, or you may have Norton Antivirus software running with an Adware protection option selected that blocks JavaScript navigational elements.
To display navigational elements, you may need to disable the ad-blocking software during e-learning sessions.
Configuring your web browser to allow pop-up windows
Most web browsers include a feature to block pop-up windows. While this may eliminate unwanted or bothersome pop-up windows, the feature sometimes can impede the functionality of legitimate or useful websites.
Some popular Penn-affiliated websites requiring pop-ups include U@Penn and the Penn Online Directory.
Follow the instructions below to configure your web browser to allow pop-up windows for your selected websites.
- Apple Safari (macOS)
- Google Chrome .current (Windows/macOS)
- Mozilla Firefox.current (Windows/macOS)
- Microsoft Internet Explorer (Windows)
- Microsoft Edge (Windows 10 only)
Note: If you have installed third party applications to block pop-ups (examples include the Google, MSN, and Yahoo! toolbars), be sure to consult the vendor documentation to allow pop-up windows for desired websites.
Safari (macOS)
Safari for macOS has no per-website control over blocking pop-up windows. Pop-ups are either blocked, or they are not. To allow pop-ups:
- From the Safari menu, choose Preferences. and click the Security tab.
- Ensure the Block pop-up windows option is not checked. Unchecking this option will allow pop-ups.
- To block pop-ups once again, check the Block pop-up windows checkbox.
Note: If you are concerned about allowing pop-ups globally for all websites that you browse, consider using another web browser that allows website exceptions such as Chrome or Firefox.
Chrome .current (Windows/macOS)
- Open Chrome, then go to the web page that you want to allow pop-ups.
- In Chrome’s URL window, highlight the entire web address of the current page, then choose the Copy command from the Edit menu or right-click and choose the Copy command.
- Click the icon with three horizontal bars in the upper right side of the browser toolbar.
- Click Settings.
- Scroll to the bottom of the Settings section and click Show advanced settings. .
- In the Privacy section, click Content settings. . The Content settings window appears.
- Scroll to the Pop-ups section, and then ensure the Do not allow any site to show pop-ups radio button is selected.
- Click Manage exceptions. .
- In the Hostname pattern field, choose the Paste command from the Edit menu or right-click and choose the Paste command, and ensure the Behavior dropdown menu is set to Allow.
Notes: Pasting the web address of a page you wish to allow pop-ups is recommended, rather than typing the generic main web address. For example, you might visit www.example.com/requirepopup.html, but the page is actually hosted at popup.example.com/forms/popupform.html. In this example, you must allow popup.example.com, not www.example.com. Note also that entire websites must be allowed, not individual directories or pages, so in this example Chrome will automatically add the top level popup.example.com to its Allowed sites.
Firefox .current (Windows/macOS)
- Open Firefox, then go to the web page that you want to allow pop-ups.
- In Firefox’s URL window, highlight the entire web address of the current page, then choose the Copy command from the Edit menu or right-click and choose the Copy command.
- Click the icon with three horizontal bars in the upper right side of the browser toolbar.
- Select Options (Windows) or Preferences (macOS).
- In the left sidebar, click on the Content icon to display the Content section.
- In the Pop-ups section, ensure the Block pop-up windows checkbox is selected, then click the adjacent Exceptions... button.
- In the Address of web site: field, choose the Paste command from the Edit menu or right-click and choose the Paste command, and then click Allow.
Notes: Pasting the web address of a page you wish to allow pop-ups is recommended, rather than typing the generic main web address. For example, you might visit www.example.com/requirepopup.html, but the page is actually hosted at popup.example.com/forms/popupform.html. In this example, you must allow popup.example.com, not www.example.com. Note also that entire websites must be allowed, not individual directories or pages, so in this example Firefox will automatically add the top level popup.example.com to its Allowed sites.
Internet Explorer (Windows)
When a website attempts to launch a new pop-up window, you may see dialog boxes alerting you of pop-up windows that have been blocked. Follow the instructions below to allow pop-up windows on a per-website basis.
- Open Internet Explorer, then go to the web page that you want to allow pop-ups.
- In Internet Explorer’s Address field, highlight the entire web address of the current page, then right-click and choose the Copy command.
- From the Tools menu (the gear icon on the far right), select Internet options. The Internet Options dialog box opens.
- Click on the Privacy tab.
- Under Pop-up Blocker ensure the Turn on Pop-up Blocker checkbox is checked, and then click Settings. The Pop-up Blocker Settings dialog box opens.
- Right-click in the Address of website to allow: field, then choose the Paste command.
Notes: Pasting the web address of a page you wish to allow pop-ups is recommended, rather than typing the generic main web address. For example, you might visit www.example.com/requirepopup.html, but the page is actually hosted at popup.example.com/forms/popupform.html. In this example, you must allow popup.example.com, not www.example.com. Note also that entire websites must be allowed, not individual directories or pages, so in this example Internet Explorer will automatically add the top level popup.example.com to its Allowed sites.
For more information about pop-ups, see Learn more about Pop-up Blocker, located at the bottom of the dialog box.
Edge (Windows 10 only)
Microsoft Edge for Windows 10 has no per-website control over blocking pop-up windows. Pop-ups are either blocked, or they are not. To allow pop-ups:
- Click the ellipsis icon (. ) in the upper right corner of your web browser, and then click Settings.
- In the Advanced settings section, click View advanced settings.
- In the Block pop-ups section, click the switch to Off. Pop-ups are now allowed.
- To block pop-ups once again, click the switch to On.
Note: If you are concerned about allowing pop-ups globally for all websites that you browse, consider using another web browser that allows website exceptions such as Chrome or Firefox.
How to Enable Pop-Up Windows in Web Browsers?
How to Enable Pop-Up Windows in Web Browsers?
A pop—up blocker is a program that prevents pop-ups from displaying in a web browser.
You can allow all pop-ups by disabling the pop-up blocker. The instructions are different for different web browsers. This article covers the most popular browser types used by our linguists and clients.
Google Chrome
By default, Google Chrome blocks pop-ups from automatically showing up on your screen. When a pop-up is blocked, the address bar will be marked Pop-ups blocked
- Click the Chrome menu button on the browser toolbar .
- Select Settings.
- Click Show advanced settings.
- in the «Privacy» section, click the Content settings button.
- In the «Pop-ups» section, click Manage exceptions.
Internet Explorer
- Click Start, click Run, type inetcpl.cpl, and then click OK to open the Internet Properties dialog box. Alternatively, open Internet Explorer, and then click Internet Options on the Tools menu to open the Internet Properties dialog box.
- Click the Privacy tab, and then do either of the following:
- Click to select Block pop-ups to turn Pop-up Blocker on.
- Click to clear Block pop-ups to turn Pop-up Blocker off.
Firefox
To access the pop-up blocker settings:
- At the top of the Firefox window, click on the Tools menu then click Options . If you don’t see Tools menu press Alt key on your key board then you will see menu bar across the top of the browser select Tools menu.
- Select the Content panel.
- In the content panel:
-
-
- Block pop-up windows: Deselect this to disable the pop-up blocker altogether.
- Exceptions: List sites that you want to allow to display pop-ups.
The dialog has the following choices:
- Allow: Click this to add a website to the exceptions list.
- Remove Site: Click this to remove a website from the exceptions list.
- Remove All Sites: Click this to remove all of the websites in the exceptions list.
-
Safari
- Open up your Safari Web browser.
- Go to the Safari menu and choose ‘Preferences‘ from the list of choices
- Click on the Security heading.
- Check the box marked ‘Block pop-up windows‘ if you would like Safari to block all popups. Safari will then ask if you would really like to change the setting.
- Click the OK button in order to change the setting.
- Click on the box again, so it does not have a check mark, if you want Safari to allow popup windows.
- Close the Preferences windows after you have finished changing settings.
- Shut down and restart Safari.
Working with Pop-up Windows
Table of Contents
HTML Executable lets you open several windows called pop-up windows (or popup) in the same IE browser publication; thus your users can see additional information without navigating away from the current page in the main window. Popup windows are windows without toolbar or status bar. They can feature a custom menu bar however.
Each popup has a unique name.
How should pop-up windows display?
In HTML Executable, you can define several properties for pop-up windows: go to Application Settings => Pop-Ups.
You may define the default size for new pop-up windows: enter the desired width and height in the different fields. You may also click on the Auto-Sizer button: it will display a small window that you can resize as you want, then HTML Executable will automatically set the window’s height and width according to the size you have chosen.
Do not manage popup Z order automatically
By default, pop-up windows are created as children of the main window. Consequently, you cannot return to the main window before closing the pop-up window. If you want to create independent pop-up windows, then enable this option.
Include a menu bar for each pop-up
Pop-up windows may have their own menu bar with specific commands like Print, Close or custom ones. Enable this option and click Edit Menu Bar Items to manage the menu’s entries.
You can call some script commands from the default Global and Macros scripts that contain commands useful for popup menus:
Global.HEExitPublication : exits the publication.
Global.HECloseCurrentPopup : closes the active pop-up.
Global.HEPopupPrintPreview : shows the print preview for the current pop-up which lets end users print the contents of the pop-up window.
For instance, if you want to add a “Print” menu to your pop-up windows, click Add, enter “Print” and click OK. Then choose “Execute this script function”, select Global.HEPopupPrintPreview and that’s all. You should get the same result as shown on this screenshot:
Note: all pop-up windows will share the same menu bar.
How to open a popup window
There are several ways to open a new popup window from your HTML pages:
with a standard hyperlink tag
Use the target parameter _blank , or if you also want to assign a name to the new popup, use _hepopup_ followed by the name of your popup window (no space, alphanumeric characters only).
The popup’s name will be pop1 and this popup will show the compiled webpage named popup1.htm
Note that _blank will always open a new window while _hepopup_[name] will bring the [name] window to the front if the latter already exists. For instance, click twice on the hyperlinks above.
You can also use external links like https://www.htmlexe.com: our website
with JavaScript functions:
Open a popup with window.open.
window.open will only take account of the “width” and “height” parameters if available. If you want to set the position too, use window.external.ShowPopup instead.
Note that you should always give a name to the popup window you create with window.open.
Open a popup with window.external.ShowPopup
Syntax for window.external.ShowPopup:
- Name: name of your popup window.
- URL: url to the page that should be displayed. It can be a virtual path to a compiled page or a full URL. Relative paths are not handled.
- Width, Height: width and height of the popup window (in pixels).
- Left, Top: x and y screen coordinates of the top-left corner (in pixels).
Param: blank or one creation parameter parentexplicit, parentismain or noresize
parentexplicit: makes the popup independent (ignores the z-order auto management set by the option named “Do not manage popup Z order automatically” described above).
parentismain: the popup is a child of the main window, and not the window with the page or script that opened it.
noresize: does not allow the end user to resize the popup window.
Note: to create a screen-centered popup, set both Left and Top to -1.
All parameters are required.
with HEScript
An internal HEScript procedure Showpopup is available and lets you specify additional parameters for your popup window.
- Name: name of your popup window.
- URL: url to the page that should be displayed. It can be a virtual path to a compiled page or a full URL.
- Width, Height: width and height of the popup window (in pixels).
- Left, Top: x and y screen coordinates of the top-left corner (in pixels). If both set to -1, the popup appears centered.
- IsModal: always set the value to false.
- RedirectLinksToMain: whether you want the popup window to redirect all hyperlinks to the main window (when a user clicks a link, the page is displayed in the main window). Could be useful for website contents.
Example: you could associate the following procedure (ShowFirstPopup) with a custom menu command or a toolbar button.
Note: ShowPopupEx exists too.
Additionally you could add the following HEScript commands to your UserMain script:
In that case, you can now display any popup you want without having to create a specific HEScript function for each popup. To call the previous NewWindow function from your HTML pages, use:
How to close a popup window
If you wish to close the popup window from the popup itself, you can use:
- window.close (JavaScript):
End users may be prompted by Internet Explorer if they want to close the window.
- window.external.CloseCurrentWindow (JavaScript):
Contrary to the previous one, this function does not ask end users whether they want to close the popup window.
If you wish to close any popup, use window.external.ClosePopup(name) (JavaScript). You just need to know the popup’s name (that can be retrieved with the window.name JavaScript property).
This function also exists in HEScript:
To close all popup windows, use the HEScript function CloseAllPopups.
How to modify a popup size/position, set the focus…
You can set up properties for popup windows using the SetUIProp function (available as HEScript or window.external JavaScript extension).
Available property names are Left (x position), Top (y position), Width, Height, Caption (window title).
Example: we want to move an existing popup to another location. We can use this JavaScript code: