systm.spanish-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Dec-18 16:24 UTC
Get and obtain a result with prototype
Hi first thanks for taking the time to read this question. here we
go..
i am making a is typing message for my Ajax Based Chat. right now i
want to do this..
idUser = the id of the registered user
bridgeConection = the channel of selection of all messages
(example : SELECT messages FROM chat WHERE bridge_conection = 88) the
same goes when i insert the data on the data base.
WHEN JOES TYPES A MESSAGE THIS WHAT I WANT TO HAPPEND
( send a Ajax.Updater but take id=idUser (001) and
id=bridgeConection (88) and update one data base table and the query
goes like this.
statuses
0 = not typing
1 = is typing
SQL CODE:
UPDATE typing SET status = ''1'' WHERE bridge_conection` =
''88'' and
id_user=''001''
after that i want to read that status. for that we need another
function that will get that result every 3 seconds.
CODE:
function getStatus()
{
get the status from the other user and if it is 1 show an inner html
(user is currently typing a message...) if it is 0 dont show
anything.
}
getStatus();
return the status with a $(''keyboard_status'').innerHTML =
''user is
currently typing a message...'';
<div id=''keyboard_status''></div>
how do i do this using prototype can some one please really guide me
onto this thanks in advance my MSN is
systm.span...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org (email
to CHAT) . i will apreciate the person that would take the time
helping me :D
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---