Click to See Complete Forum and Search --> : Clear file control


Gopinath
06-25-2003, 03:51 AM
in my screen
i am having one file control and clear (not reset) button.

i select one file and click the clear button, the value of the file control should be cleared

if it is text control
document.formname.txtcontrolname.value=""

but it is not possible for file control.
any other way to clear the content in file control

thanks
-gopi

Padrill
06-25-2003, 05:13 AM
Please give more details.

Gopinath
06-25-2003, 05:24 AM
When click clear button, the contents in file control should be cleared

Padrill
06-25-2003, 05:31 AM
Why don't you use a reset button?

Gopinath
06-25-2003, 08:15 AM
it will refresh the total page

jeffmott
06-25-2003, 08:20 AM
Do you mean one "clear" button to be associated with only one control of the form?it will refresh the total pageA reset button will set all control within its associated form to their default value, but not refresh the entire page.

Gopinath
06-25-2003, 08:26 AM
the problem

i am having two combo boxes
one is subject and another one is course
when the page is loaded subject combo fills with data.
when select any data from subject combo, the course data relevant to the subject will be populated in course combo.
so, it is not possible by reset.
it will totaly remove all the data from subject combo

thanks

-gopi

Gopinath
06-26-2003, 08:04 AM
I want to clear my file control wothout using reset button
my requirement is
i have a file control and a image
i have selected one file using file control. now
the file control displays the selected file.
i want to clear the details which is displayed in file control when i click the image
help pls

thanks
-gopi

pyro
06-26-2003, 08:09 AM
Did you lose your original thread? http://forums.webdeveloper.com/showthread.php?s=&threadid=11635

[edit - ah, merged]

Gopinath
06-26-2003, 08:09 AM
Sorry dave,
i don't know:o

Gopinath
06-26-2003, 08:15 AM
i can't get the solution from my first thread

Padrill
06-27-2003, 06:24 AM
Use a separate form for your file field and reset button. This way only the file field will be cleared.

Eg.
<form name="form1">
<input type="text" name="course">
</form>
<form name="form2">
<input type="file">
<input type="reset">
</form>