Ask a Question related to Macromedia Dynamic HTML, Design and Development.
-
123nani123 #1
problem with reset/clear in <input type="file" >
how to clear values in input file object.
In My Form i need to upload a file and enter some values in other text fields.
i have "Submit" and "Clear".
i f i click clear button i need to call a javascript function and clear all
fields.
I am able to clear all fields by setting "" to each field object.
Where as for object <input type="file" > i could not clear value in it.
my code is as below
Can any one help me??
------------
<script>
fnClear(){
document.forms[0].txtAttachment.value = "";
}
</script>
<html>
<form>
<input type="file" name="txtAttachment" size="50" maxlength="100"
id="txtAttachment" >
123nani123 Guest
-
html <input type="file"> can you set a value first ?
There has GOT to be a way. I'm not gonna give up. -
Help please: Exception when with <input type="file"> but not with Textbox
I've encounted a pretty strange problem and I'm not quite sure what to make of it. I have a web service that consumes an XML file as well as a... -
<input type="image"... based custom control
I have created one of these controls but arent getting any call backs. I've got the source from the MSPress book "Developing Microsoft ASP.NET... -
HTML + <input type="File">
Hi I'm trying to set default value for input type file. <input type="File" name="tx_pdffile" accept="*.pdf" class="boxText" value="abc.pdf"> ... -
<input type="file"> readonly
Just reading from a previous thread about multiple uploads. I wanted to use script to create multiple input file elements that put the path in as... -
Diego Nunes #2
Re: problem with reset/clear in <input type="file" >
The answer is simples: the input[type='file'] don't have the "value"
propertie. It's a security question... Realize that you enter a site
and this site has a input[type='file'] in a hidden (position:
absolute; top: -10000;). In the case of you could change the "value"
property for a input[type='file'], you would be able to get files from
the guest's PC without his permission. You would be able to change the
"value" to any value and, if the path you set (i.e.:
c:\windows\php.ini) exists in the guest's PC, the file would be sent
to the server. Got it?
You can do a simple "document.forms['formname'].reset()" to solve
your problem.
[]s
--
~~ ~
diego nunes
web engineer
~ ~~
Diego Nunes Guest



Reply With Quote

