This is a migrated thread and some comments may be shown as answers.

JS Error "Invalid Argument" on RadWindow

1 Answer 60 Views
Window
This is a migrated thread and some comments may be shown as answers.
Kevin
Top achievements
Rank 1
Kevin asked on 01 Apr 2009, 02:34 PM

Hello,

I have a RadWindow defined as the following:

<telerik:RadWindow ID="radWindow360Value" runat="server"
  SkinID="Default" Behaviors="Close" NavigateUrl="~/360Value.aspx"
  OpenerElementID="btnDetailedCostCalc"
  OnClientClose="clientClose360Value"
  OnClientShow="clientShow360Value"
  Left="5px" Width="800px" Height="700px">
</telerik:RadWindow>

The 360Value.aspx page is the following:

<body id="bdy36Value" runat="server">
  <form id="frm360Value" runat="server">
    <div id="div360Viewer" runat="server">
      <iframe id="ifm360Value" runat="server" frameborder="0" scrolling="auto" src="BlankPage.aspx" width="100%" height="100%"></iframe>
    </div>
    <br />
    <asp:Button ID="btnDone" runat="server" UseSubmitBehavior="false" Text="Done" OnClientClick="return close360Value();" />
  </form>
</body>

When the window is popped up via the following:

<input type="button" id="btnDetailedCostCalc" class="btn" runat="server" onclick="Show360ValueWindow();" value="Launch Detailed Cost Calculator" />

function Show360ValueWindow() {
  var oWnd = $find(s360ValueRadWindowClientID);
  oWnd.SetSize(document.documentElement.clientWidth - 20, document.documentElement.clientHeight - 15);
  oWnd.show();
  oWnd.MoveTo(10, document.documentElement.scrollTop + 10);
}

I get an "Invalid Argument" on line 54 which is in the resize function of the telerik controls xv2scripts.js file.  Specifically, this is line 54:

contentObj.style.height = (getWindowHeight() - nonContentHeight) + "px";

The current values of those items are:

contentObj.style.height = ""
getWindowHeight() = 150
nonContentHeight = 177

What can I do to have this not throw the error.  I am working in IE8 and it happens in both normal and compatibility mode.

Thanks,
Kevin

1 Answer, 1 is accepted

Sort by
0
Kevin
Top achievements
Rank 1
answered on 01 Apr 2009, 03:44 PM
I have figured out my own problem.  Basically, the IFrame (ifm360Value) loaded another .aspx page that had 5 hidden controls and when the page loads, I needed to submit the form.  I was doing it this way in the Page_Load event:

ScriptManager.RegisterStartupScript(Me.Page, Me.Page.GetType, "360ValueLogin", "frmSSO.submit();", True)

I changed it to the following and it works like a champ:

ScriptManager.RegisterStartupScript(Me.Page, Me.Page.GetType, "360ValueLogin", "Sys.WebForms.PageRequestManager.getInstance().add_pageLoaded(ForceAction);", True)

Where the ForceAction is really only doing a frmSSO.submit();

Hope this helps someone out there.
Kevin
Tags
Window
Asked by
Kevin
Top achievements
Rank 1
Answers by
Kevin
Top achievements
Rank 1
Share this question
or