or
...
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
table
>
...
<
tr
id
=
"trFileName"
runat
=
"server"
>
<
td
><
asp:Label
ID
=
"lblFile"
runat
=
"server"
>File name:</
asp:Label
></
td
>
<
td
><
asp:FileUpload
ID
=
"txtFileName"
runat
=
"server"
EnableViewState
=
"true"
></
asp:FileUpload
></
td
>
</
tr
>
...
</
table
>
<
asp:TextBox
ID
=
"txtOldFile"
runat
=
"server"
style
=
"display:none;"
/>
<
asp:Button
ID
=
"btnSubmit"
runat
=
"server"
Text
=
"Update"
OnClientClick
=
"insertLink();"
/>
<
script
type
=
"text/javascript"
>
if (window.attachEvent) {
window.attachEvent("onload", initDialog);
}
else if (window.addEventListener) {
window.addEventListener("load", initDialog, false);
}
var workLink = null;
function getRadWindow() {
if (window.radWindow) {
return window.radWindow;
}
if (window.frameElement && window.frameElement.radWindow) {
return window.frameElement.radWindow;
}
return null;
}
function initDialog() {
var clientParameters = getRadWindow().ClientParameters; //return the arguments supplied from the parent page
getRadWindow().moveTo(50, 50); // <----- Commenting this line does not result in the window reappearing.
//window.removeEventListener("load", initDialog, false); // <---- Tried this with no change in behavior.
workLink = clientParameters;
}
function insertLink() //fires when the Insert Link button is clicked
{
//create an object and set some custom properties to it
var file = document.getElementById("<%=txtFileName.ClientID%>");
var path = file.value;
var ext = path.substring(path.lastIndexOf(".") + 1, path.length).toLowerCase();
if (ext == null || ext == "") {
workLink.href = document.getElementById("<%=txtOldFile.ClientID%>").value;
} else {
workLink.href = ext;
}
getRadWindow().close(workLink); //use the close function of the getRadWindow to close the dialog and pass the arguments from the dialog to the callback function on the main page.
}
</
script
>
</
form
>
</
body
>
</
html
>
(Chart.PlotArea.Series[0] as LineSeries).SeriesItems
Any ideas?
Thanks,
A
var panel = <%= ajaxPanel.ClientID %>;
panel.ajaxRequest(
'<%= ajaxPanel.UniqueID %>'
,
''
);