Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4429136

IE5 crashes when applet updates page via LiveConnect

XMLWordPrintable

    • 04
    • unknown, x86
    • solaris, windows_2000

        We have an applet running inside the JRE plugin for Internet Explorer that updates a web page via LiveConnect. The updates occur in response to messages from JMS. It works correctly some of the time, but IE will frequently crash, usually when the user is interacting with IE in some way while the page is updating, such as resizing the frame. We've tried versions 1.2.2, 1.3.0, and 1.3.1 in IE5.5, all have the same problem.
        DESCRIPTIONEND
        TESTCASEBEGIN
        APPLET:
        private JSObject window;

        try {
        window = JSObject.getWindow(this);
                } catch (Exception e) {
                    e.printStackTrace();
                }
                
        QuoteField f = quoteItem.get(field);
        Object[] args = {tag, quoteItem.toString(field, displayFormat), new Integer(f == null ? QuoteField.TIC_DIRECTION_NORMAL : f.getDisplayTicDirection())};
        synchronized(window) {
        try {
        window.call("onData", args);
                 } catch (Exception e) {
                 e.printStackTrace();
                 }
                 }

        JavaScript:

        function onData(tag, value, ticDirection)
        {
        switch (ticDirection) {
        case 0:
        document.all[tag].style.backgroundColor = 0xFFCC00;
        break;
        case 1:
        document.all[tag].style.backgroundColor = 0x33cc00;
        break;
        case 2:
        document.all[tag].style.backgroundColor = 0xcc0033;
        break;
        default:
        document.all[tag].style.backgroundColor = "";
        break;
        }

        document.all[tag].innerHTML = makeFraction(value);
        }
        Basically, we run JMS messages from our server into the attached
        'UpdaterApplet'. It turns these messages into updates to the DHTML content
        by calling the LiveConnect classes. As you will see, these will frequently
        fail. It does not happen using the standard MS VM.

        I have tried running our application with jre 1.3.0.01, but it doesn't work.
        It appears that the LiveConnect API no longer passes data to the web page in
        the same way. For example, when we pass an Integer as an argmument to
        JSObject.call(), it shows up on the JavaScript side as type Object under
        1.2.2. With 1.3.0.01, it shows up as type Number. According to the
        LiveConnect documentation from Netscape, the way it is implemented in 1.2.2
        is correct. Was this change intentional, or is it a bug?

              stanleyh Stanley Ho (Inactive)
              mimiali Mir Ali (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: