activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From NJ No1 <naman.jo...@macquarie.com>
Subject Re: [Spam: 5.0] ActiveMQ Applet
Date Thu, 15 Mar 2007 22:53:05 GMT


James.Strachan wrote:
> 
> Which browser did you use? Were there any javascript errors?
> 
My HTML looks like:

   <head>
        <title>Message Listening</title>

        <script type="text/javascript" src="/amq/amq.js"></script>
        <script type="text/javascript">amq.uri='/amq';</script>
            <script type="text/javascript">
                                var myHandler = {
                                        rcvMessage: function(message) {
                                                msg =
document.createElement('div');
                                                msg.innerHTML = 'received: '
+ message.textContent;
                                                display =
document.getElementById('display');
                                               
document.body.insertBefore(msg, display);
                                                }
                                };
                               
amq.addListener('test1','topic://mweb.log',myHandler.rcvMessage);

        </script>
    </head>
    <body>
                <div id="display"/>

    </body>
</html>

Using firefox I do not get any Javascript error messages but it works
intermittently. However, using IE when I load the page nothing happens. But
when i send a message to the topic and the Javascript is about to read it, i
get a pop-up saying "[object-error]"???


James.Strachan wrote:
> 
> Here you go
> http://java.sun.com/docs/books/tutorial/deployment/applet/index.html
> 
> This page lists the jars you'll need
> http://activemq.apache.org/initial-configuration.html
> -- 
> 

Thanks for the links, but I have a basic idea of how to write an applet, I
just don't know how to print the messages from a topic to the applet. Any
ideas?

Thanks
Naman
-- 
View this message in context: http://www.nabble.com/ActiveMQ-Applet-tf3405557s2354.html#a9505298
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message