javascript - Delete textarea text on submit in new tab? -
so i'm working on chat scheme , though know works in pretty lame way - submitting messages in new window () - i'm interested if there's way reset textarea's content after sending message.
now, problem is, i've found ways via javascript (editing textarea's value), don't know how "launch" javascript after submitting form.
obviously, can utilize onsubmit(), delete's value before sending data. works, sends empty text.
any ideas? thanks!
a mutual solution re-create values of <form>
object can convert json. way, have re-create of values doesn't alter when reset fields of form. jquery create simple. see also: serializing , submitting form jquery post , php
the sec solution submit form , lastly thing, add together timeout resets form. there little gap , user might able type while handler clearing form.
javascript jquery html textarea chat
No comments:
Post a Comment