JS Error "Invalid Argument" on RadWindow

2 posts, 0 answers
  1. Kevin
    Kevin avatar
    2 posts
    Member since:
    Mar 2009

    Posted 01 Apr 2009 Link to this post

    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

  2. Kevin
    Kevin avatar
    2 posts
    Member since:
    Mar 2009

    Posted 01 Apr 2009 Link to this post

    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
Back to Top