Closure Posted November 7, 2009 Share Posted November 7, 2009 Hello below is my mini chat form with chat window. Its in my foot and work along side the page the user is on, so if they post a message and press enter to send to chat, it leaves the message in the text area. How can I clear the text area after pressing "say", without refreshing the page they are currently on. Thank you! James echo" <form action=mchat.php method=post target=\"chat\" name=chatform> <input type=text name=text size=10 maxlength=500> <input type=submit value=Say>"; ?> <form onsubmit="document.chatform.submit(); document.chatform.text.value='';"> <? echo"<iframe src=\"mchat.php\" name=\"chat\" width=120 frameborder='0' height=200 align=center style='border-width=2; border-color=red;'/> </iframe> </form></center></div></div>"; Link to comment https://forums.phpfreaks.com/topic/180661-clearing-form-after-entering-little-help-please/ Share on other sites More sharing options...
Closure Posted November 7, 2009 Author Share Posted November 7, 2009 Anyone able to help? Link to comment https://forums.phpfreaks.com/topic/180661-clearing-form-after-entering-little-help-please/#findComment-953380 Share on other sites More sharing options...
The Little Guy Posted November 8, 2009 Share Posted November 8, 2009 You will need javascript for this. Why do you have a form inside a form? That is invalid HTML. Please fix and post back, and please use the code tags. Link to comment https://forums.phpfreaks.com/topic/180661-clearing-form-after-entering-little-help-please/#findComment-953515 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.