AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Delphi and indy

Ein Thema von drama22 · begonnen am 7. Okt 2014 · letzter Beitrag vom 10. Okt 2014
Antwort Antwort
mjustin

Registriert seit: 14. Apr 2008
3.010 Beiträge
 
Delphi 2009 Professional
 
#1

AW: Delphi and indy

  Alt 8. Okt 2014, 17:15

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.
Michael Justin
  Mit Zitat antworten Zitat
drama22

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

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
drama22

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

AW: Delphi and indy

  Alt 10. Okt 2014, 15:14
is there any other component make every thing easier ? i need a component that allow graident back ground and can send smiles any one can help with that ?
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 11:48 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz