Einzelnen Beitrag anzeigen

drama22

Registriert seit: 12. Jan 2013
88 Beiträge
 
#10

AW: Delphi and indy

  Alt 9. Okt 2014, 00:43

do i have to use TIDHTTP and get message in webpage ?

i usuaily do this with after sending the message

MeMoTEXT.Lines.Add(MSG); i cant do same with Embedded WB ?
No, you can not use Memo Lines in a web browser. A web browser renders HTML and optionally processes JavaScript.

You need a HTML page which is generated and updated automatically when a new chat message arrives.

So you need a HTTP server (for example TIdHTTPServer), and a good knowledge of HTML.

The dynamic HTML content can use animated icons of course. The main problem however is how the HTML page is refreshed when new messages arrive.

I recommend to start with a simple prototype, using a JavaScript framework like jQuery, to build a first basic chat app. The basic chat page would contain one public chat room where all messages can be seen by all users.

New chat messages can be added as new elements in the HTML document tree. With jQuery, you can delete and append HTML elements very easy, so the client side would only contain some lines of JavaScript.

The server needs to build th new HTML elements and serve them to the jQuery script. This is where long polling comes into the play, see my linked article.
i have good knoweledge in html and php and js and css iam still new in delphi the project that i worked on its like Paltalk its multiple chat room i dont think app like paltalk using IDHTTP can i do it inside delphi ? adding smiles and color of text with any good component ?
  Mit Zitat antworten Zitat