Link to home
Start Free TrialLog in
Avatar of brad0525
brad0525

asked on

Can not get textarea to clear with onclick

I am using the script below to submit information to the database. I am trying to clear the textarea as well as the file input with the onclick event as I want to keep the other hidden field value. For some reason it will not clear at all and I am not sure why..Any help would be greatly appreciated..Thanks
<fieldset>
						<legend>Add Information</legend>
						
						<form action="scripts/ajaxupload1.php" method="post" name="standard_use" id="standard_use" enctype="multipart/form-data">
                         <p>Description:<br /><textarea name="description" id="description" rows="8" cols="80" /></textarea>
                         <script type="text/javascript">
			//<![CDATA[

				CKEDITOR.replace( 'description',
					{
						fullPage : true
					});

			//]]>
			</script>
                       <input type="hidden" name="entryid" value="<?php echo ''.$_GET['id'].'' ?>" /></p>
							<p><input type="file" name="filename" id="filename" /></p>
							<button onclick="ajaxUpload(this.form,'scripts/ajaxupload1.php?filename=filename&amp;maxSize=9999999999&amp;maxW=1000&amp;fullPath=http://www.tristatefoliagewonder.com/new_site/uploads/&amp;relPath=../uploads/&amp;colorR=255&amp;colorG=255&amp;colorB=255&amp;maxH=1000','upload_area','File Uploading Please Wait...&lt;br /&gt;&lt;img src=\'images/loader_light_blue.gif\' width=\'128\' height=\'15\' border=\'0\' /&gt;','&lt;img src=\'images/error.gif\' width=\'16\' height=\'16\' border=\'0\' /&gt; Error in Upload, check settings and path info in source code.');document.standard_use.description.value='';return false; ">Upload Image</button>
						</form>
					</fieldset>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Samuel Liew
Samuel Liew
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial