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?
ajax chat stream
Collapse
X
-
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
1. 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
2. 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
3. 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
-
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/s...?rid=350799450 this is the chat stream ajax
Comment
Comment