activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stratio <>
Subject Re: Problem with Ajax API
Date Mon, 27 Dec 2010 21:56:44 GMT

Ok i'm going almost crazy, i tried it in every different way but everytime i
get the same result. My code works on Chrome and Safari and doesn't work on
Firefox and Opera :(. I tried it both on win 7 and ubuntu... This is the the
index.html page i start with :



<script type="text/javascript"

<script type="text/javascript" src='stomp.js'></script>

<script type="text/javascript" src="jquery-1.4.2.min.js"></script>

<script type="text/javascript" src="amq_jquery_adapter.js"></script>

<script type="text/javascript" src="amq.js"></script>

<script type="text/javascript">

	var amq = org.activemq.Amq;

	amq.init({ uri: 'amq', logging: true, timeout: 45, clientId:(new
Date()).getTime().toString() });	



<body bgcolor="lightgreen">

<script type="text/javascript">


	function ListenCoordinates()


		alert("Il browser non supporta i websocket");


		document.write("<center><strong>Inizio la connessione con le API


		var myHandler =


  			rcvMessage: function(message)


	  			today = new Date();

	  			document.write(today.getHours(), ":", today.getMinutes(), ":" ,
today.getSeconds() ,"  -  ", today.getDate(), "/", today.getMonth(), "/",

     			document.write("<br/>Coordinate ricevute!<br/>");



		amq.addListener("test", "topic://ActiveMQFeed", myHandler.rcvMessage);

		//amq.removeListener("test", "topic://ActiveMQFeed");

	  	return false;



<center><h3> javascript:ListenCoordinates() Inizia l'ascolto </h3></center>

<pre id="debug"></pre>



The main problem is that under chrome and safari the order of the messages
(connection and subscription to the topic) is  right (I checked with Js
debugger) instead in firefox and Opera it seems that the order is not
correct but i can't understand why....

Thank you in advance for your help and happy holidays :) 
View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message