List Info

Thread: How do i send 2 fields in one request ? with prototype ?




How do i send 2 fields in one request ? with prototype ?
user name
2007-12-18 01:16:39
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.spanishgmail.com
(email
to CHAT) . i will apreciate the person that would take the
time
helping me 



--~--~---------~--~----~------------~-------~--~----~
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-spinoffsgooglegroups.com
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=
en
-~----------~----~----~----~------~----~------~--~---


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )