Internet Explorer

3 views
Skip to first unread message

Brandon

unread,
Nov 7, 2008, 11:11:32 AM11/7/08
to Orbited Discussion
I'm having an issue with Internet Explorer. It appears to open a
connection only once. Meaning if you open a page with the Orbited JS
code on it, IE will make the connection. If you navigate away then
come back to the page, the connection won't reestablish. Sometimes IE
just sits there and spins it's wheels when you go back to the page, so
it's trying to do something. You have to close and reopen Internet
Explorer to make it connect again. Has anyone else had this problem,
and if so, what can I do to counter Internet Explorer's stupidity?

Nickolas Daskalou

unread,
Nov 7, 2008, 1:10:48 PM11/7/08
to orbite...@googlegroups.com
I have had issues with IE6 and Orbited 0.7.0.

What version of Internet Explorer are you running? Do you have debugging enabled (you must unselect "Disable blah blah" in IE's Options, under the Advanced tab in IE6), and if so what error messages does IE throw?


2008/11/8 Brandon <brando...@gmail.com>

Brandon Casci

unread,
Nov 7, 2008, 1:28:39 PM11/7/08
to orbite...@googlegroups.com
I don't know if I'd call it a debugger...I have something that crashes every time it catches a javascript exception in IE. nice eh?

What was the nature of your problem? Maybe that will get me pointed in the right direction.
Message has been deleted

Michael Carter

unread,
Nov 7, 2008, 6:24:30 PM11/7/08
to orbite...@googlegroups.com
Hey Brandon,

I'll investigate this problem. One suggestion for now, try adding an onunload function to your script, and make sure you shut down the connection with a call to conn.reset()

-Michael Carter

Brandon Casci

unread,
Nov 7, 2008, 6:34:27 PM11/7/08
to orbite...@googlegroups.com
I will try. Right now it the code that wires up all the network events looks liek this....

        onload = function() {
            // set up shell.
            var output = $('chat_data');
            // set up stomp client.
            stomp = new STOMPClient();
            stomp.onopen = function() {
                //output.insert({"top" : "Transport openned"});
            };
            stomp.onclose = function(code) {
                output.insert({"top" : "Transport closed (code: " + code + ")"});
            };
            stomp.onerror = function(error) {
                alert("onerror: " + error);
            };
            stomp.onerrorframe = function(frame) {
                alert("onerrorframe: " + frame.body);
            };
            stomp.onconnectedframe = function() {
                output.insert({"top" : "Connected to chat room"});
            };
            stomp.onmessageframe = function(frame) {
                eval(frame.body);
                //output.insert({"top" : frame.body});
            };
          stomp.connect('localhost', 61613, randomUUID(), '');
          setTimeout("stomp.subscribe('/channel/1', {exchange:''})",5000);
        };

What exactly would I be adding? Sorry to be spoon fed. I'm just starting to learn about JS. I'm not clear if this is an unload event for the document, or the stomp connection.

It's frustrating that IE is so lame. Everything appears to work great in several other browsers.

A bit off topic but I heard MS may use a different rendering engine for IE 8, and they may choose an open source one. If they do, I hope this means IE will be more pleasant to work with when it comes to HTML, CSS and JS.

Michael Carter

unread,
Nov 7, 2008, 6:44:54 PM11/7/08
to orbite...@googlegroups.com
It looks like the STOMP client doesn't have a reset function -- that needs to be added.

In the mean time, try adding this script tag after your orbited include, and see if it helps.
<script>
Orbited.util.chooseTransport = function() {
    return Orbited.CometTransports.LongPoll;
}
</script>

-Michael Carter

Brandon Casci

unread,
Nov 10, 2008, 10:46:19 AM11/10/08
to orbite...@googlegroups.com
Ok, finally got myself back to work. That code resulted in a loop that kept calling this URL

http://localhost:8500/tcp/9cb00de0f8134c7fbfc3b5d25675616b/longpoll?ack=5

Brandon

unread,
Nov 11, 2008, 1:56:47 PM11/11/08
to Orbited Discussion
FYI - when you come back to the page, stomp.onclose gets called and
the param value is NaN

On Nov 7, 6:44 pm, "Michael Carter" <cartermich...@gmail.com> wrote:
> It looks like the STOMP client doesn't have a reset function -- that needs
> to be added.
>
> In the mean time, try adding this script tag after your orbited include, and
> see if it helps.
> <script>
> Orbited.util.chooseTransport = function() {
>     return Orbited.CometTransports.LongPoll;}
>
> </script>
>
> -Michael Carter
> > On Fri, Nov 7, 2008 at 6:24 PM, Michael Carter <cartermich...@gmail.com>wrote:
>
> >> Hey Brandon,
>
> >> I'll investigate this problem. One suggestion for now, try adding an
> >> onunload function to your script, and make sure you shut down the connection
> >> with a call to conn.reset()
>
> >> -Michael Carter
>

Brandon Casci

unread,
Nov 11, 2008, 1:59:58 PM11/11/08
to Orbited Discussion
oh ya.....tried something else as well.

I tried making my stomp client variable global and did this....

        onunload = function() {
          try { stomp.disconnect(); } catch(e) { alert(e);}
        }

It appears to work as expected in Firefox, but doesn' t help with IE.

Michael Carter

unread,
Nov 11, 2008, 2:13:20 PM11/11/08
to orbite...@googlegroups.com
On Tue, Nov 11, 2008 at 10:59 AM, Brandon Casci <brando...@gmail.com> wrote:
oh ya.....tried something else as well.

I tried making my stomp client variable global and did this....

        onunload = function() {
          try { stomp.disconnect(); } catch(e) { alert(e);}
        }

It appears to work as expected in Firefox, but doesn' t help with IE.

What you really need is an onunload call to conn.reset() (conn is the underlying TCPSocket for a STOMPClient instance), but thats not exposed via the STOMPClient interface. Try adding a self.reset = function() { conn.reset(); } to your js.io.STOMPClient source, and call stomp.reset onunload;

-Michael Carter

Brandon Casci

unread,
Nov 11, 2008, 2:40:04 PM11/11/08
to orbite...@googlegroups.com
Ok, I'm trying that, but I can't figure out how to access the stomp client's connection. Here is the exception...

TypeError: protocol.reset is not a function

I think I need to do the same thing for the LineProtocol object. Think so?

Brandon Casci

unread,
Nov 11, 2008, 2:47:37 PM11/11/08
to orbite...@googlegroups.com
Ok...I figured it out, though it's made no impact on IE.
Reply all
Reply to author
Forward
0 new messages