S
Steve
<script language=javascript>
function selectFile(fileUrl)
{
if(navigator.appName.indexOf('Microsoft')!=-1)
window.returnValue=fileUrl;
else
window.opener.setAssetValue(fileUrl);
self.close();
}
</script>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:Button ID="Button1" runat="server"
OnClientClick="selectFile('blabla')" Text="Button" />
When I run this code for some reason, it seems to do it twice. Also,
the first time I press the button the window is still open, but the
second time I press the button it correctly closes the window.
Any idea what is going on?
Also do you know the syntax of how I can pass the parameter of the text
in textbox1 instead of the 'blabla' to the javascript function?
function selectFile(fileUrl)
{
if(navigator.appName.indexOf('Microsoft')!=-1)
window.returnValue=fileUrl;
else
window.opener.setAssetValue(fileUrl);
self.close();
}
</script>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:Button ID="Button1" runat="server"
OnClientClick="selectFile('blabla')" Text="Button" />
When I run this code for some reason, it seems to do it twice. Also,
the first time I press the button the window is still open, but the
second time I press the button it correctly closes the window.
Any idea what is going on?
Also do you know the syntax of how I can pass the parameter of the text
in textbox1 instead of the 'blabla' to the javascript function?