Partager via


External.showPopup method

[The feature associated with this page, Windows Media Player SDK, is a legacy feature. It has been superseded by MediaPlayer. MediaPlayer has been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer instead of Windows Media Player SDK, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

Note

This topic describes functionality designed for use by online stores. Use of this functionality outside the context of an online store is not supported.

The showPopup method instructs Windows Media Player to display a pop-up webpage; that is, a webpage that appears in a separate window.

Syntax

External.showPopup(
  PopupIndex,
  Parameters
)

Parameters

PopupIndex [in]

Number (long) that specifies the index of the pop-up webpage.

Parameters [in]

String that Windows Media Player appends to the URL of the webpage.

Return value

This method does not return a value.

Remarks

The pop-up index is not interpreted by Windows Media Player. Indexes that identify pop-up webpages are created by the online store, and have meaning only to the online store.

The following steps show how Windows Media Player uses the parameters of the showPopup method to create a URL for the popup window.

  1. Script on a discovery page calls showPopup, passing an integer in PopupIndex and a string in Parameters.

  2. Windows Media Player passes the index to IWMPContentPartner::GetItemInfo to retrieve the URL of the webpage to be displayed.

  3. Windows Media Player appends Parameters to the URL as a query string. For example, if GetItemInfo returns "https://www.Proseware.com/Pages/Popup1.htm" and Parameters is equal to "DlgX=800&DlgY=400&Greeting=Hi", Windows Media Player creates the following URL:

    https://www.Proseware.com/Pages/Popup1.htm?DlgX=800&DlgY=400&Greeting=Hi

You can use Parameters to specify the size of the pop-up window. For example, if you set Parameters to "DlgX=800&DlgY=400", the pop-up window will have a size of 800 pixels by 400 pixels.

Requirements

Requirement Value
Version
Windows Media Player 11
DLL
Wmp.dll

See also

External Object for Type 1 Online Stores