Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q641 Can I code around the dreaded 'Interface not supported' error message?

You are here: irt.org | FAQ | JavaScript | Window | Q641 [ previous next ]

All JavaScript enabled browsers support the window objects open method. However, Internet Explorer 4 can have a windows registry setting corrputed which causes the dreaded 'Interface not supported' error message. See Is there a solution for the window.open problem with Internet Explorer 4? for details.

To take account of the error message you could try:

<SCRIPT LANGUAGE="JavaScript1.1"><!--
onerror = failsafely;
//--></SCRIPT>

<SCRIPT LANGUAGE="JavaScript"><!--
function failSafely(message) {
    if (message == 'Interface not supported') {
        alert('I detected a possible problem with your browser - see http://www.irt.org/script/322.htm');
        return true;
    }
    return false;
}

function openSafely() {
    window.open('testpage.htm');
}
//--></SCRIPT>

©2018 Martin Webb