I want to perform an file upload using framework 7 if possible but i do not know to to continue. I know it is possible with html5 with a code like this, even if I implement it,
How can I trigger a html with a button ? Putt it in a popup what is the best/general usage ?
Second question, will html file input work in ios and android ? or I should I implement them externally ?
Framework doesnt matter, its javascript, how can I access that file uploader from javascript ? with DOM manipulation ? can you provide some piece of code ?
What I want to do is, trigger file upload from my button, not from chooser as seen in the image
code doees not include word “choose” but choose is seen on screen ?
I have this list-item and I want to open file chooser when this list-item clicked
thanks for the links I will have a look, meanwhile I think something misundersood, of course file dialog needed (input tag)I do not want to hide it, I just asked how I can trigger it from my own button instead of choose button,
Ah, I think you misunderstood. The “Choose” button is the input[file]. You can’t change the text either, that’s why we thought you wanted to hide the button as it is the only way to show it as something nicer looking.
Whatever it is you want, hidden or not, just find the input element and trigger click with your own button.
Eg: <a href="#" onClick="test()">Test</a>
<script>
function test()
{
$$(’#_file’).trigger(‘click’);
}
</script>