473,321 Members | 1,916 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,321 software developers and data experts.

Javascript: listen to server

Is there a way in JavaScript to command the browser to listen to a specific location? i.e. a stream of data
Mar 13 '10 #1
3 3506
gits
5,390 Expert Mod 4TB
could you explain that requirement in more detail please? ... you could always poll ... but it is a bit more advanced in case you want to have a persistent connection due to the stateless character of http connections ...

kind regards
Mar 14 '10 #2
I am writing a live-chat, clients will send data to server and the server will send the data to all clients currently connected.
I need the client to listen for that data.
Mar 16 '10 #3
gits
5,390 Expert Mod 4TB
then the easiest way would be to poll a service with an interval like:

Expand|Select|Wrap|Line Numbers
  1. var interval = window.setInterval(function() {
  2.     // service call logic here, could even be a function-cll with the logic
  3. }, 30000);
this calls the commented code every 30s ...

kind regards
Mar 16 '10 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Aquila Deus | last post by:
Hi all! I just tried to enable TCP/IP on SQL Server 2000 (trial, SP3a). The Server Network Utility shows it's already turned on, but after restarting the server doesn't listen to any TCP port,...
0
by: Crirus | last post by:
I have a Socket server. Any value I give to the listener.Listen(1) socket, seems that it accept any connection request... why's that? I set a sleep on send thread in order to delay the response...
1
by: Marcelo | last post by:
_____ From: Marcelo Posted At: Friday, September 30, 2005 1:40 PM Posted To: microsoft.public.dotnet.languages.vb Conversation: Subject: Client and Server - Listen por packets in a specific...
3
by: Frank van Vugt | last post by:
L.S. Either the docs or I are missing something.... While using libpq I noticed that listen/notify calls were being converted to lowercase. A further look showed that the listen/notify calls...
27
by: Chris | last post by:
Hi, I have a form for uploading documents and inserting the data into a mysql db. I would like to validate the form. I have tried a couple of Javascript form validation functions, but it...
4
by: kidalex | last post by:
I'm a programmer but I have never programmed in Action Script or very advanced JavaScript. So, please be gentle :-) I'm looking to develop a simple ( or is it? ) system with 2 parts to it: ...
7
by: silverburgh.meryl | last post by:
Hi, I read the following code which open a server socket for client request. However, i would like to know how can I change it so that i just listen for client requestfor 10 seconds, after...
1
by: gabe | last post by:
How do you call a client side javascript callback method after an update panel has posted back to the server? I have two update panels (A + B) with a gridview in each panel. GridView B has a...
8
by: Mateusz Viste | last post by:
Hi, I'm not sure if my question is really related to JavaScript, so please excuse me if that's not the case (and maybe you guys would have an idea what's the cause is and where could I ask)... ...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.