Problem with JoinLeave feature in speeqe, specially in IE, ERROR: Unexpected call to method or property access

3 views
Skip to first unread message
Message has been deleted

Rajeev

unread,
Sep 14, 2009, 12:55:44 AM9/14/09
to speeqe-dev
Hi,
I am using Speeqe for integrating chat into my application. As you
see, whenever a user joined into the chat room, the message will be
displayed in the chat room.

" Rajeev Attingal@ speeqe.com : has joined the room."

The code for this functionality is here,

if (chatwindow.hasClass('joinleave'))
{
var room_avatar = '/avatar-service/lookup/?
sha1=f2f8ab835b10d66f9233518d1047f3014b3857cf';
var join_message_ar = ["<message from='"+nick+"'
to...@dev.TrophyIM.com/3' id='1' type='groupchat'><x
xmlns='jabber:x:event'><composing/></x></message>"];
var join_message_jq = J(join_message_ar.join(""));
var body_elem = document.createElement("body");
var body_text = document.createTextNode("/me has "+status
+" the
room.");
body_elem.appendChild(body_text);

join_message_jq.append(body_elem);
Application.messageView().displayMessage(nick,
room_avatar,
join_message_jq.get(0),
false);
}

It works only in Firefox browser. In IE it gives error, "Unexpected
call to method or property access ".

The problem is seem to be in the line;
join_message_jq.append(body_elem);

Does this related to append problem with Jquery?
Or is it possible to get the "body" tag to append, for getting the XML
as <x xml=.......><body></body>

Thanks,
Rajeev

Nathan Zorn

unread,
Sep 14, 2009, 8:29:24 AM9/14/09
to speeq...@googlegroups.com
Yes the error is with the "<body>" tag.  It seems that IE doesn't like operations done on a "<body>" tag.

I created a ticket for this issue.  I believe the quick fix is to use strophe to create the xml used in the join/leave message.  It would be nice to rework the messages so that xml isn't required for client messages.

http://code.stanziq.com/speeqe/ticket/78

On Mon, Sep 14, 2009 at 12:52 AM, Rajeev <rajeeva...@gmail.com> wrote:

Hi,
I am using Speeqe for integrating chat into my application. As you
see, whenever a user joined into the chat room, the message will be
displayed in the chat room.

" Rajeev Attingal@  speeqe.com :  has joined the room."

The code for this functionality is here,

if (chatwindow.hasClass('joinleave'))
       {
           var room_avatar = '/avatar-service/lookup/?
sha1=f2f8ab835b10d66f9233518d1047f3014b3857cf';
           var join_message_ar = ["<message from='"+nick+"'
to...@dev.TrophyIM.com/3' id='1' type='groupchat'><x
xmlns='jabber:x:event'><composing/></x></message>"];
           var join_message_jq = J(join_message_ar.join(""));
           var body_elem = document.createElement("body");
           var body_text = document.createTextNode("/me has "+status
+" the
room.");
           body_elem.appendChild(body_text);

           join_message_jq.append(body_elem);
           Application.messageView().displayMessage(nick,
                                            room_avatar,
                                            join_message_jq.get(0),
                                            false);
       }

It works only in Firefox browser. In IE it givesHi,
Reply all
Reply to author
Forward
0 new messages