Link to home
Start Free TrialLog in
Avatar of 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
						<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">

				CKEDITOR.replace( 'description',
						fullPage : true

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

Open in new window

Avatar of Samuel Liew
Samuel Liew
Flag of Australia image

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