ajax chat stream

Started on the old forum in June 2009 · view the original in the archive · old links redirect here

4 replies · 1,329 views · started 17 years ago · 1 min read

2 participants
n00b Developer · 61 posts #1

hi can anyone tell me hoe to put a inage into a ajax chay stream please i have tried all the usual ways like <img and bbcode even a iframe and it still wont work i seen some one do it and it got me intrested could anyone help me?

rukiya Lead · 569 posts #2

img iframe wont help you here.? You javascript? if you know then try ajax. Or learn 1st javascript well.

alright here is a short tutorial for ajax chat.

  1. html form

  2. a php file

  3. a js

  4. in the html form put username,chatmsg input, and the submit button should have onclick event hander in the onclick event you have to input the core js function . above the form use div mentioning id which show the chat msgs

  5. in the php page use get or post mothod to send query as I recommend you to use db instead of flat file .put a while loop which will echo chat msgs

  6. in js you need to make a connection between the html form page and php page . make the core js function which will put msgs in the div. some method commonly used here are getElementById(),innerHTML() and you have send the html form data in the php asynchously using XMLHttpRequest (). send data when XmlHttp object's readyState property is 4 or complete. send mothed need to be same as like php file. . add javascript timer to get updated file in div

n00b Developer · 61 posts #3

sorry thats not what i ment, i want to be able to put a image into a chat stream thats not mine. the chat stream is on mocospace i saw someone put a image instead of text which is not allowed and i was wondering how they done it? http://www.mocospace.com/html/chat/start.jsp?rid=350799450 this is the chat stream ajax

n00b Developer · 61 posts #5

image please rukiya if you dont mind tellin me

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close