2

I have following problem. I have input field in form, type of file:

 <FORM action="http://server.com/cgi/handle" enctype="multipart/form-data" method="post"> <P> What is your name? <INPUT type="text" name="submit-name"><BR> What files are you sending? <INPUT type="file" name="files"><BR> <INPUT type="submit" value="Send"> <INPUT type="reset"> </FORM> 

I am setting using JavaScript also files property of this input and I want this input on submit of form send the file property instead of his value. Is it possible to do so?

var data = e.dataTransfer; var input = dojo.byId(inputName); var file = data.files[i]; input.files[0] = file; 

data is a datatransfer object, I am getting files from there.

I know, it will be possible only in few browsers, I dont care. I just need to get it working at least in FF.

1 Answer 1

1

So if I understand you correctly you drop some files and you want to populate a file input object

I see a drop example here http://help.dottoro.com/ljslrhdh.php

but to populate the file field you will need a pretty heavy privilege change using a signed script - UniversalFileRead is probably the one you need

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.