Hi,

it seems like you're experiencing "same origin policy" restriction
(https://developer.mozilla.org/en-US/docs/JavaScript/Same_origin_policy_for_JavaScript).
You need to connect to the broker on the same domain in which your js
code is hosted.


Regards
--
Dejan Bosanac
----------------------
Red Hat, Inc.
FuseSource is now part of Red Hat
dbosa...@redhat.com
Twitter: @dejanb
Blog: http://sensatic.net
ActiveMQ in Action: http://www.manning.com/snyder/


On Fri, Dec 28, 2012 at 6:01 AM, tapaswini.sabat
<tapaswini.saba...@gmail.com> wrote:
> Hi All,
>
> I'm new to the ActiveMQ field. Am able to create a client,publish and
> subscribe the data through websocket. But the same am trying to achieve
> through amq. Am not using any java code in my project. can i achieve this by
> a js file only ?
>
> my code in the script file is something like this:
>
>
>
>
>
>
> </head>
> </html>
>
>
> Now if i run this code i don't see anything on the browser and on the Chrome
> Javascript debugger i get this error :
>
> XMLHttpRequest cannot load http://localhost:8161/demo/amq. Origin
> http://swp.local is not allowed by Access-Control-Allow-Origin.
>
> Can anybody know what might be the problem?
>
> Thanks
> Tapaswini
>
>
>
> --
> View this message in context: 
> http://activemq.2283324.n4.nabble.com/Problem-with-Ajax-API-tp3155676p4661152.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to