Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

javascript - get data from server

Status
Not open for further replies.

hagai2003

Programmer
Joined
Feb 17, 2006
Messages
1
Location
IL
Hi all,

I wanted to ask what methods can i use to get data from the http server without reloading the page.
let's take a chat for example, if i wanted to make an online javascript chat, than I guess i would have to split the page to frames, and one frame will automatically reload itself every 2 seconds and reads the new data from the chat server.
I don't like this solution beacuse the status bar is always waiting and reloading.
I saw what i want on gmail, you probably know that Gmail added a chat option, and left side of the screen shows you the people online like Messenger or ICQ.
now I dont see that something reloads every few seconds, i don't see it on the status bar of Iexplorer and i don't feel it when i browse my Gmail.
anyone know's how to do that?
the only way i thought about is using a small frame and using the javascript
xxxxx.src="getdata.php" that will run every few seconds and will load new data from the server.

is there any other way to get data from the server other than rechanging the "src" attribute every few seconds?

thanks in advance,
Hagai.
 
Try doing a search for "Ajax Javascript" on Google. It's something that is certainly gaining popularity for doing just what you desire - getting a sending data from a server without using frames, or refreshing the page.

Hope this helps,
Dan

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top