Jump to content

Clearing Form after entering, little help please.


Closure

Recommended Posts

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>";

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.