1

HTML

<form id="send-message">
    <input type="text" id="message"></input>
</form>

JS

 $messageForm.submit(function(e){

            e.preventDefault();
            socket.emit('send message', $messageBox.val());


    $messageBox.val('')
    });

img

I don't want the older insert popup when clicking on the text area.

hjpotter92
  • 78,589
  • 36
  • 144
  • 183
user3706324
  • 23
  • 1
  • 5

3 Answers3

2

You can use autocomplete attribute with off value :

<form id="send-message" autocomplete="off"></form>
potashin
  • 44,205
  • 11
  • 83
  • 107
  • This doesn't work on some browsers. You have to add it to the form element for the best browser support. – Alex W Jun 13 '14 at 18:39
0

You need to turn off autocompletion on your form.

<form name="form1" id="form1" method="post" autocomplete="off"
  action="http://www.example.com/form.cgi">
[...]
</form>
Alex W
  • 37,233
  • 13
  • 109
  • 109
0
autocomplete="off"

Would do it. This way you can switch the Autocomplete of the Browser off.

Browser saves the Previous successfull form submission and would let the user reuse those values when he resubmits the form, or has to resubmit the form. That is a Chrome's Autocomplete popup.

If you use, autocomplete="off" for the input, this would be switched off for that particular element.

Afzaal Ahmad Zeeshan
  • 15,669
  • 12
  • 55
  • 103