You are here: Reference > JavaScript > client-side > browser > methods > postError (opera)

postError method (opera)

Browser support:
Prints each argument as a separate message to the Error Console.
In Internet Explorer, use the Debug object to send messages to the output window of an open script debugger. To send messages to a console in Firefox, use the reportError method for the Error Console and the dump method for the Console window.

Syntax:

object.postError ([message0 [, message1 [, ...[, messageN]]]]);
You can find the related objects in the Supported by objects section below.

Parameters:

messageN
Optional. String that specifies a message.

Return value:

This method has no return value.

Example HTML code 1:

This example illustrates the use of the postError method:
<head>
    <script type="text/javascript">
        function PrintToConsole () {
            if (window.opera) {
                opera.postError ("First message.", "Second message.");
            }
        }
    </script>
</head>
<body>
    <button onclick="PrintToConsole ();">Print to console</button>
</body>
Did you find this example helpful? yes no

Supported by objects:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content