Forum Moderators: open

Message Too Old, No Replies

Input Text Without Save Form Data

         

TheAlbinoEthiopian

4:48 pm on Aug 25, 2007 (gmt 0)

10+ Year Member



I'm building a chat for the ACP of a website I'm making, but I've run into a problem. Textareaa are useless to me because line breaks only show in the chat source, but not the actual chat, and I want the submit to be done using the enter key, not a submit button. The problem I have with input areas is that form data saves, so when you've posted 20 times in the chat, it gets annoying for all of your responses to drop down. Is there any way in Javascript to disable save form data, or possibly just work around it in a way that doesn't save it?

rocknbil

6:18 pm on Aug 26, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I am presuming this is a web-based chat.

<body onload="document.getElementById('textfield').value=''">

Something like that? Or you could identify the enter key by character code and use onKeyPress, but beware IE-based browsers and "everything else" see them in two different ways.