Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by AndrewAMD. 12/05/23 10:56
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
6 registered members (AndrewAMD, alibaba, fairtrader, ozgur, TipmyPip, Quad), 622 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Javascript Chat Room Help #212361
06/21/08 20:25
06/21/08 20:25
Joined: Jan 2008
Posts: 1,580
Blade280891 Offline OP
Serious User
Blade280891  Offline OP
Serious User

Joined: Jan 2008
Posts: 1,580
I have followed a tutorial making a chat room.

http://djw-webdesign.awardspace.com/ice_chat/chatroom/login.php

I am now having a problem regarding the refreshing , i don't like it refreshing the page every second, is there a way to have it refresh in the background or only refresh when someone using it posts.

If you need to see code just say.


My Avatar Randomness V2

"Someone get me to the doctor, and someone call the nurse
And someone buy me roses, and someone burned the church"
Re: Javascript Chat Room Help [Re: Blade280891] #212369
06/21/08 21:36
06/21/08 21:36
Joined: Aug 2003
Posts: 2,122
Berlin, Germany
checkbutton Offline

Expert
checkbutton  Offline

Expert

Joined: Aug 2003
Posts: 2,122
Berlin, Germany
use ajax


I don't have a homepage, for god's sake!
Re: Javascript Chat Room Help [Re: checkbutton] #212377
06/21/08 22:45
06/21/08 22:45
Joined: Jan 2008
Posts: 1,580
Blade280891 Offline OP
Serious User
Blade280891  Offline OP
Serious User

Joined: Jan 2008
Posts: 1,580
This is using ajax i think. I'm not sure, i don't know js or ajax.


My Avatar Randomness V2

"Someone get me to the doctor, and someone call the nurse
And someone buy me roses, and someone burned the church"
Re: Javascript Chat Room Help [Re: Blade280891] #212404
06/22/08 09:36
06/22/08 09:36
Joined: Jan 2006
Posts: 1,829
Neustadt, Germany
T
TWO Offline

Serious User
TWO  Offline

Serious User
T

Joined: Jan 2006
Posts: 1,829
Neustadt, Germany
I made a nice chat using ajax long time ago: http://chat.oliver-weitzel.com/Chat.php

Re: Javascript Chat Room Help [Re: TWO] #212406
06/22/08 10:01
06/22/08 10:01
Joined: Jan 2003
Posts: 4,615
Cambridge
Joey Offline
Expert
Joey  Offline
Expert

Joined: Jan 2003
Posts: 4,615
Cambridge
i solved it by updating via ajax and when there's no post, increase the time for the next refresh. you can't send messages from the server to the client without opening a socket or binding elsewhere to a port (which is not possible in javascript, actually, if you want you can still look for the js extensions for firefox which *could* support that, i'm not sure). you can only "request", not "wait for a message".

joey

Re: Javascript Chat Room Help [Re: Joey] #212427
06/22/08 12:07
06/22/08 12:07
Joined: Aug 2003
Posts: 2,122
Berlin, Germany
checkbutton Offline

Expert
checkbutton  Offline

Expert

Joined: Aug 2003
Posts: 2,122
Berlin, Germany
This is pull, push is not possible with php and js.


I don't have a homepage, for god's sake!
Re: Javascript Chat Room Help [Re: checkbutton] #212455
06/22/08 14:23
06/22/08 14:23
Joined: Jan 2008
Posts: 1,580
Blade280891 Offline OP
Serious User
Blade280891  Offline OP
Serious User

Joined: Jan 2008
Posts: 1,580
*two is there any chance you could help with my chat?


My Avatar Randomness V2

"Someone get me to the doctor, and someone call the nurse
And someone buy me roses, and someone burned the church"
Re: Javascript Chat Room Help [Re: Blade280891] #212459
06/22/08 14:39
06/22/08 14:39
Joined: Jan 2006
Posts: 1,829
Neustadt, Germany
T
TWO Offline

Serious User
TWO  Offline

Serious User
T

Joined: Jan 2006
Posts: 1,829
Neustadt, Germany
Umm, you may add me in icq. You should do as Joey told you, this is exactly the way my code works. Grab some AJAX book (and if you dont know php, a php book too) and start trying. If you have any further questions, ask here or in icq.

Re: Javascript Chat Room Help [Re: TWO] #212719
06/23/08 21:20
06/23/08 21:20
Joined: Jan 2008
Posts: 1,580
Blade280891 Offline OP
Serious User
Blade280891  Offline OP
Serious User

Joined: Jan 2008
Posts: 1,580
Ok, pplz, i have now learnt the basics of ajax and JS and now have the problem of it pulling the data, i can get it to pull data through an even but how can i get it to always pull data or at regular intervals?


My Avatar Randomness V2

"Someone get me to the doctor, and someone call the nurse
And someone buy me roses, and someone burned the church"
Re: Javascript Chat Room Help [Re: Blade280891] #212837
06/24/08 14:36
06/24/08 14:36
Joined: Dec 2003
Posts: 1,225
germany
gri Offline
Serious User
gri  Offline
Serious User

Joined: Dec 2003
Posts: 1,225
germany
hi,
what is the problem here ?

I doesnt looked at your example link but simply
use the XMLHttpRequest - object.

No POSTBACKS needed.

The server store the postings in a database or in an array in RAM.

A JS function calls periodly the server for updates and refresh the content of an DIV element as example.

You can send your posting to the server with the XMLHttpRequest object too.

No postback of the whole website, modern dynamic webprogramming.
No AJAX extensions needed.

Work with PHP. I use it with ASP.NET.

,gri


"Make a great game or kill it early" (Bruce Shelley, Ensemble Studios)
Page 1 of 2 1 2

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1