Hello!
Do you know where can I get from a free very very simple chat script? I need no rooms, no regs, no any functions, just a filed to type the msg and a window above it to show the new msg's. I have been looking for weeks around the whole internet All ready scripts I've found are with too many functions... Dop you have an idea?
And.. actually I've first tried to build the chat myself, for the sanme reason that it is very simple, but I was told that for the window with the messages referesh on every new msg I need javascript, but I knwo just PHP. Do you have any ideas how can I do this throgh PHP? 😕

    Well, without Javascript, there's no way to refresh the window. Unless you wanted to use an I-Frame to show the chat, and refresh the I-Frame with a <meta http-equiv="refresh" content="5;url" /> tag to automatically refresh that I-Frame every 5 seconds.

    But really, you could simply refresh the frame with a Prototype (or jQuery or Dojo or Mootools, etc.) implementation. For example, if I were to do this, I would expect all chat entries to be logged in a database (so I have a record of the chat). So I'd have two functions: One to read the chat, the other to add to the chat.

    My page would consist of a <div> that is updated automatically via a Javascript call to my read function. At the bottom is this input box that would allow the user to say something to the group. That form would post to the other function.

    The javascript would just constantly call that "view" function every few seconds and get a result back. It would the parse it, and display it. There's no real easy way to get around not using javascript unless you want to use an I-Frame or refresh the entire page (which may lose the users input).

      Write a Reply...