how to drag & drop value from textbox to fileupload using javascript? [Resolved]

Posted by Hariinakoti under JavaScript on 9/26/2012 | Points: 10 | Views : 1393 | Status : [Member] | Replies : 1
Hi All,
As for my requirement i want to drag & drop some value from textbox to fileupload with javascript?
Please anybody solve it.

Thanks & Regards
Hari



Responses

Posted by: Hariinakoti on: 9/26/2012 [Member] Starter | Points: 25

Up
0
Down

Resolved
Hi Friends,
Me only got the solution:

<body>
<form id="form1" runat="server">
<div>
<input type="text" id="file1" style="width: 354px" /><input type="button" id="btnbrowse" value="Browse..." onclick="select1();"/><br />
<input type="file" id="file1hidden" style="display:none; width: 442px;"/>
<input type="text" id="file2" style="width: 354px"/>
</div>
</form>
<script language="javascript" type="text/javascript">
function select1()
{
document.getElementById("file1").value=" ";
document.getElementById("file1hidden").click();
var file1value=document.getElementById("file1hidden").value;
document.getElementById("file2").value=" ";
document.getElementById("file2").value=file1value;
}
</script>
</body>

Thanks & Regards
Hari

Hariinakoti, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response