Basically I have a text input and a file input. I want to take the value of the text input and stick it in the file input. Simple HTML + Javascript is:
<input type="text" id="myText" />
<input type="file" id="myFile" />
<script type="text/javascript">
function doIt() {
var textInput = document.getElementById("myText");
var fileInput = document.getElementById("myFile");
fileInput.value = textInput.value;
}
</script>
This seems like a pretty simple thing to want to do but I guess it's a security no-no (?)... Firefox says:
"Exception: "security error" code : "0x805303e8 (NS_SECURITY_DOM_SECURITY_ERR)" location... line 56
Anyone know a way to get this to work?
<input type="text" id="myText" />
<input type="file" id="myFile" />
<script type="text/javascript">
function doIt() {
var textInput = document.getElementById("myText");
var fileInput = document.getElementById("myFile");
fileInput.value = textInput.value;
}
</script>
This seems like a pretty simple thing to want to do but I guess it's a security no-no (?)... Firefox says:
"Exception: "security error" code : "0x805303e8 (NS_SECURITY_DOM_SECURITY_ERR)" location... line 56
Anyone know a way to get this to work?
Comment