Thanks John,
The io is now found but I am getting this:
XMLHttpRequest cannot load 
http://localhost:8080/socket.io/1/?t=1351888164983. Origin 
http://127.0.0.1:8080 <http://127.0.0.1/> is not allowed by 
Access-Control-Allow-Origin.



perjantai, 2. marraskuuta 2012 0.18.55 UTC+2 John Fitzgerald kirjoitti:
>
> Try this for the html, loads socket.io from a CDN. (Works on my 
> computer...)
>
> <script src="//
> cdnjs.cloudflare.com/ajax/libs/socket.io/0.9.10/socket.io.min.js
> "></script>
> <script>
>   var socket = io.connect('http://localhost');
>   socket.on('news', function (data) {
>     console.log(data);
>     socket.emit('my other event', { my: 'data' });
>   });
> </script>
>
>
> On Thu, Nov 1, 2012 at 3:01 PM, _Kili_ <[email protected] <javascript:>
> > wrote:
>
>> Thanks, I posted the same question to the correct group. I did not yet 
>> solve the problem with the help in the previous answers. Thanks for the 
>> quick replies.
>>
>> torstai, 1. marraskuuta 2012 23.29.38 UTC+2 Chad Engler kirjoitti:
>>>
>>> You may get more response form the Socket.io mailing list:
>>>
>>>  
>>>
>>> [email protected]
>>>
>>>  
>>>
>>> -Chad
>>>
>>>  
>>>
>>> *From:* [email protected] [mailto:nod...@googlegroups.**com] *On 
>>> Behalf Of *Angel Java Lopez
>>>
>>> *Sent:* Thursday, November 01, 2012 5:28 PM
>>> *To:* [email protected]
>>>
>>> *Subject:* Re: [nodejs] Problem with using socket.io
>>>
>>>  
>>>
>>> Hmmm... you must open the index.html as
>>>
>>> http://localhost/index.html
>>>
>>> I guess you cannot start it as a local file
>>>
>>> On Thu, Nov 1, 2012 at 6:12 PM, _Kili_ <[email protected]> wrote:
>>>
>>> Hi,
>>>
>>> I am beginner with node.js and just trying to make socket.io work with 
>>> this guide http://socket.io/#how-**to-use <http://socket.io/#how-to-use> 
>>> (the 
>>> first example).
>>>
>>> I am just getting "Uncaught ReferenceError: io is not defined" in the 
>>> java script console of the Chrome.
>>>
>>> Could someone help me?
>>>
>>>  
>>>
>>> -- 
>>> Job Board: http://jobs.nodejs.org/
>>> Posting guidelines: https://github.com/joyent/**node/wiki/Mailing-List-*
>>> *Posting-Guidelines<https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines>
>>> You received this message because you are subscribed to the Google
>>> Groups "nodejs" group.
>>> To post to this group, send email to [email protected]
>>>
>>> To unsubscribe from this group, send email to
>>> nodejs+un...@**googlegroups.com
>>>
>>> For more options, visit this group at
>>> http://groups.google.com/**group/nodejs?hl=en?hl=en<http://groups.google.com/group/nodejs?hl=en?hl=en>
>>>
>>>  
>>>
>>> -- 
>>> Job Board: http://jobs.nodejs.org/
>>> Posting guidelines: https://github.com/joyent/**node/wiki/Mailing-List-*
>>> *Posting-Guidelines<https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines>
>>> You received this message because you are subscribed to the Google
>>> Groups "nodejs" group.
>>> To post to this group, send email to [email protected]
>>>
>>> To unsubscribe from this group, send email to
>>> nodejs+un...@**googlegroups.com
>>>
>>> For more options, visit this group at
>>> http://groups.google.com/**group/nodejs?hl=en?hl=en<http://groups.google.com/group/nodejs?hl=en?hl=en>
>>>
>>>  -- 
>> Job Board: http://jobs.nodejs.org/
>> Posting guidelines: 
>> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
>> You received this message because you are subscribed to the Google
>> Groups "nodejs" group.
>> To post to this group, send email to [email protected]<javascript:>
>> To unsubscribe from this group, send email to
>> [email protected] <javascript:>
>> For more options, visit this group at
>> http://groups.google.com/group/nodejs?hl=en?hl=en
>>
>
>
>
> -- 
> John R. Fitzgerald
>
>
>  

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to