I have a TEXTAREA and a SUBMIT button. I would like to clear the TEXTAREA value so that it doesn't get submitted when the SUBMIT button is pressed. (It is getting too large and I don't process it anyway. It is only for display and I needed a scrolling region.)
I put an ONCLICK event on the SUBMIT button that calls a javascript function that sets the TEXTAREA's value to '', ie. allcomments.value='';. The problem is this only seems to clear the TEXTAREA value for the SUBMIT action if there is an ALERT() following the setting within the function.
Is there another way to remove a control from the SUBMIT action or is there a way to 'commit' the change to the TEXTAREA's value so that the original content is not sent with the SUBMIT?
I put an ONCLICK event on the SUBMIT button that calls a javascript function that sets the TEXTAREA's value to '', ie. allcomments.value='';. The problem is this only seems to clear the TEXTAREA value for the SUBMIT action if there is an ALERT() following the setting within the function.
Is there another way to remove a control from the SUBMIT action or is there a way to 'commit' the change to the TEXTAREA's value so that the original content is not sent with the SUBMIT?