ErrorItem.errorCode
The errorCode property retrieves the current error code.
player.error.item(
index
).errorCode
Possible Values
This property is a read-only Number (long).
Remarks
You should set Settings.enableErrorDialogs to false if you choose to display custom error messages.
Examples
The following JScript example uses ErrorItem.errorCode in an event handler to display the error code to the user. The Player object was created with ID = "Player".
<SCRIPT LANGUAGE = "JScript" FOR = Player EVENT = error()>
// Get the error code for the first error item.
errNum = Player.error.item(0).errorCode;
// Display the error information.
var message = "Error number: " + errNum);
message += "<BR>";
message += "Use your BACK button to return ";
message += "to the previous page.";
document.write(message);
</SCRIPT>
Requirements
Version |
Windows Media Player version 7.0 or later. |
DLL |
|