You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by NJ No1 <na...@macquarie.com> on 2007/03/15 23:53:05 UTC
Re: [Spam: 5.0] ActiveMQ Applet
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.
Re: [Spam: 5.0] ActiveMQ Applet
Posted by James Strachan <ja...@gmail.com>.
On 3/15/07, NJ No1 <na...@macquarie.com> wrote:
>
>
> James.Strachan wrote:
> >
> > Which browser did you use? Were there any javascript errors?
> >
> My HTML looks like:
Did the examples work for you?
http://activemq.apache.org/web-samples.html
> 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?
Use the JMS APi to get the message then draw it using AWT?
--
James
-------
http://radio.weblogs.com/0112098/