I'm uploading images to a server folder, using the following code:
<iframe width="600" name="frmfoto" height="300" frameborder="0" src="teste2.php"></iframe>
<script type="text/javascript">
function txfoto() {
var valor = window.parent.frmfoto.document.getElementById('foto').value;
$('#foto').val(valor);
}
</script>
<!-- FOTO 1 -->
<div class="form-group">
<label class="col-md-2 control-label" for="fotofundo">* Foto 01</label>
<div class="col-md-5">
<input id="fotofundo" name="fotofundo" type="text" placeholder="" class="form-control input-md" onClick="txfoto()" />
</div>
</div>
In the file uploading, here's my input:
<input id="foto" name="foto" type="text" class="form-control input-md" value="***************">
The photo goes to the server folder, prints in the input above, but I can not pull it to my other form, when I try to activate the "onClick" event in the input.
What could be wrong?