Hi to all,
I have the following code:
...
<script language="javascript" type="text/javascript">
// <!CDATA[
function btnTest_onclick() {
var f = document.forms[0];
var fn = f.FileUpload1.FileName;
alert(fn);
// Create an iframe.
var iframe = document.createElement("iframe");
// Point the iframe to the location of
// the long running process.
iframe.src = "Test2.aspx";
// Make the iframe invisible.
iframe.style.display = "none";
// Add the iframe to the DOM. The process
// will begin execution at this point.
document.body.appendChild(iframe);
// Disable the button and blur it.
document.getElementById('trigger').disabled = true;
document.getElementById('trigger').blur();
}
// ]]>
</script>
...
<form id="form1" runat="server">
<div>
<asp:FileUpload ID="FileUpload1" runat="server" Style="z-index: 100; left: 8px; position: absolute;
top: 9px" Width="470px" />
<br />
<input id="btnTest" style="z-index: 102; left: 10px; width: 465px; position: absolute;
top: 36px" type="button" value="Begin Work" onclick="return btnTest_onclick()" />
</div>
</form>
That I want to do is when I press input button (btnTest) save file in the FileUpload control, then execute the code in the javascript funcion (btnTest_onclick).
Can I do that? how? if no, please point me in another idea
thanks in advance