maikki
04-28-2007, 09:47 AM
hi guys
how can I recall 'click()' method of the <input type="file" /> by clickin on another <input type="button" />
i have code:
<script ... >
function browse() {
document.getElementById('upFile').click();
}
function setPath(path) {
document.getElementById('newPath').value = f;
}
</script>
<form ... >
<input type="file" id="upFile" onChange="setPath(this.value);" />
<input type="text" id="newPath" />
<input type="button" id="myButton" onClick="browse();" />
</form>
-------------
problem is:
under IE it opens the file browse dialog, but under mozilla and opera not
please help me solve it cause i go mad of it
how can I recall 'click()' method of the <input type="file" /> by clickin on another <input type="button" />
i have code:
<script ... >
function browse() {
document.getElementById('upFile').click();
}
function setPath(path) {
document.getElementById('newPath').value = f;
}
</script>
<form ... >
<input type="file" id="upFile" onChange="setPath(this.value);" />
<input type="text" id="newPath" />
<input type="button" id="myButton" onClick="browse();" />
</form>
-------------
problem is:
under IE it opens the file browse dialog, but under mozilla and opera not
please help me solve it cause i go mad of it