What should I add in data: and make it send the value of the message text field
<html> <head> <meta charset="utf-8"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script> </head> <body> <iframe name='chatWindow' id='chatWindow'frameborder="no" height="935" width="1910" src='iframe.php'>Chat</iframe> <br> <input type='text' id="text" name='message'> <input type='button' id="button" value="send"> <script> $(document).ready (function () { $("#button").bind("click", function (){ $.ajax ({ url: "iframe.php", type: "POST", data: ({}), dataType: "PHP" }); }); }); </script> </body> </html>