+ 1

Show every key while typing it in html!

I'd like to create a chat that show every ketword typed , not just when click in "send "... what should i learn?

9th Jun 2018, 9:36 PM
Anderson Schwartz
Anderson Schwartz - avatar
4 Respostas
+ 2
You could do an AJAX request to the server which sends out the entire output whenever a key is pressed. The other person would have a listener constantly listening for PHP responses with the message. The other side would then replace the current string buffer with the newly received one.
11th Jun 2018, 4:17 PM
Ben Allen (Njinx)
Ben Allen (Njinx) - avatar
+ 4
I don't quite understand the question... But through inference, I think you mean you type something and then click a send button, causing it to show up on the screen? For that you will need to know HTML to create the entire structure and the button itself, CSS (optional) to style the page and/or the button, and JavaScript, which allows the page to be interactive and the text to show up on the screen. PHP and JQuery are only required if you want to turn this into a front end (HTML, CSS, JS) and back end (PHP, JQuery) page with a database. Hope this helped.
9th Jun 2018, 9:42 PM
DrChicken24
DrChicken24 - avatar
+ 4
If I understood you, you should take a look at something like keypress events
9th Jun 2018, 10:03 PM
Toni Isotalo
Toni Isotalo - avatar
+ 2
Thanks!! i'm learning English.. what i really want is... Imagine the chat, like wpp or fb, when u are typing, appear "typing" but i'd like instead "typing" , i want show the text that are been typed.. without a button to send. i want send text in real time. send every key
10th Jun 2018, 12:33 PM
Anderson Schwartz
Anderson Schwartz - avatar