I want to realize a simple application in HTML/Javascript.
There should be two pages:
page1.html and page2.html. page1 should have a text box and a button. When pressing the button it should just be sent to page2, which has to display it.
I have found this example and hosted :
http://bobvann.noip.me/temp/chatp2p/
(this works with a websocket which connects to a ruby program running on that same server.
Please let me have a simple solution how to send text messages from a page to an other. Just this.
Thank you very much.
Have a good day :)
You need to use an RTCDataChannel
over a similar "peer connection" that is used for audio and video. MDN provides is a decent example that shows how to send strings, but you should be able to use the same machinery to send richer structured messages (as long as they're not too large) if you need to.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With