-
Notifications
You must be signed in to change notification settings - Fork 17
WindowAttributes
WindowAttributes is a sub-component of WLink, WInternalLink and WContentLink. It is used to provide a set of parameters for opening a new window when invoking a link.
The following properties are used to determine specific options in the pop-up window. Only the name property is required and if it is the only property specified then all other properties are ignored and the user agent will determine how to open and decorate the pop-up window. If any property is specified in addition to the name property then all unspecified properties will be given their default value.
The properties which effect the visibility of certain browser components are all commonly ignored by many user agents and are able to be easily overridden. These must never be relied upon to provide isolation of the pop-up window for 'security' purposes or to disable browser function simply because this will not work.
This includes turning off the location bar to 'hide' the URL of a particular page. This is simply a pointless exercise. If you are intending to turn off browser components in a pop up you should do so purely for aesthetic reasons and in the full knowledge that all of these properties are easily over-ridden.
Some user agents may ignore any of the following properties other than the name property. Some user agents allow users to determine how a pop up will open and may be in a new tab rather than a new window in which case all properties other than name are irrelevant. All modern user agents include pop-up blockers so if your link has a pop-up you should forewarn the user of this so they may decide whether to disable the pop-up blocker.
This is an internal reference to the window name and is not exposed to the user. Several WLink components may have WindowAttributes with the same name property. These will cause the pop-up to open in the same window as each other with all invocations after the first replacing the previous content.
If a WLink is to open in a new window this property must be explicitly specified for each instance of a WLink with a pop-up in your UI. A new and unique window may be specified using the name _blank if no other properties are specified.
Internet Explorer takes an approach to the name property which deviates from published standards and is poorly documented.
To ensure cross-browser functionality it is recommended that the following method be used for specifying a name:
If the pop up must be unique and no other properties are specified use the name _blank;
In all other cases specify a name which starts with a letter and contains only letters and numbers (/[a-zA-Z][a-zA-Z0-9]*/) note: do not use \w in the regular expression as this may include _ which may under some circumstances break IE.
This is used to specify the position of the top of the pop-up relative to the top of the user's screen in pixels. If not specified the default is determined by the user agent. Some user agents may ignore this even if they implement other properties.
This is used to specify the position of the left edge of the pop-up relative to the left edge of the user's screen in pixels. If not specified the default is determined by the user agent. Some user agents may ignore this even if they implement other properties.
This is used to specify the width of the pop-up in pixels. Some user agents may ignore this even if they implement other properties.
This is used to specify the height of the pop-up in pixels. Some user agents may ignore this even if they implement other properties.
This Boolean property is used to indicate whether the pop-up window is resizeable by the user and defaults to false if any property other than name is set. Many modern user agents ignore this property and a pop-up is always resizeable; others provide a mechanism for the user to override this property and set all pop-ups to be resizeable.
NOTE: If any property other than name is set then this property should always be specified to be true. This will allow users to resize a pop-up which may, for example, be necessary if they use a large font or have a small screen.
This Boolean property is used to indicate whether the user agents menu bar is shown and defaults to false if any property other than name is set.
This Boolean property is used to indicate whether the user agents tool bar (if any) is shown and defaults to false if any property other than name is set.
This Boolean property is used to indicate whether the user agents address/location bar (if any) is shown and defaults to false if any property other than name is set.
This Boolean property is used to indicate whether the user agents status bar (if any) is shown and defaults to false if any property other than name is set.
This Boolean property is used to indicate whether the user agents scroll bars (if any) is shown and defaults to false if any property other than name is set.
NOTE: If any property other than name is set then this property should always be specified to be true. This will allow users to scroll the content within a dialog if the content is larger than the dialog's size and may be necessary, for example, if they use a large font or a screen magnifier, or have a small screen.
No popups will work on Windows Mobile 8, including links using the target attribute. If your application has an external audience or an audience which includes users of Windows Mobile 8 then it cannot use WPopup or WindowAttributes.