mkmanning, many thanks - your solution worked!
The input is now replaces with an identical, new input.
thanks again!
mkmanning wrote:
You could replace the file input when the URL field is focused:
$('#fu').replaceWith('input id=fu type=file /');
where #fu is the file input.
Try:
$('#input_id').focus(function(){
$(this).attr(value,);
});
On Oct 12, 5:59 pm, captaincarp harry.wi...@gmail.com wrote:
My image upload form has a choice of either upload image by entering url or
by browsing for a file,
I'm trying to empty the file-input input if you focus on
Yeah this is what I've been trying,
i think maybe different rules apply for file inputs perhaps?
amuhlou wrote:
Try:
$('#input_id').focus(function(){
$(this).attr(value,);
});
On Oct 12, 5:59 pm, captaincarp harry.wi...@gmail.com wrote:
My image upload form has a
hmm yeah, I did a quick google search and it appears that allowing you
to access a file input's value attribute would pose a security issue.
I found a solution but the code isn't exactly pretty
http://gusiev.com/2009/04/clear-upload-file-input-field/
On Oct 12, 6:43 pm, captaincarp
You could replace the file input when the URL field is focused:
$('#fu').replaceWith('input id=fu type=file /');
where #fu is the file input.
On Oct 12, 11:53 am, amuhlou amysch...@gmail.com wrote:
hmm yeah, I did a quick google search and it appears that allowing you
to access a file
Sounds like a good idea - i'll give it a try in the morning and let you know
if i have any luck
wierd that there doesnt seem any way of directly altering the file inputs
value... perhaps its a security thing...
mkmanning wrote:
You could replace the file input when the URL field is
Yes, it is a security thing. Otherwise malicious developers would be
adding paths to user's existing files and be able to silently upload
user's files without their knowledge.
On Oct 12, 11:33 am, captaincarp harry.wi...@gmail.com wrote:
Sounds like a good idea - i'll give it a try in the
7 matches
Mail list logo