RadSearchBox javascript error when inside container with display:none

3 posts, 0 answers
  1. Ben
    Ben avatar
    2 posts
    Member since:
    Jun 2013

    Posted 18 Jun 2013 Link to this post

    Ok,

    I'm getting a javascript error any time a RadSearchBox is contained within any element that has a display:none style set to it.

    As an example, let's say you want to put a RadSearchBox inside a user control which is inside a RadPanelBar.

    Each one of the below user controls contains a RadSearchBox.
    <telerik:RadPanelBar ID="RadPanelBar1" runat="server">
      <Items>
          <telerik:RadPanelItem Text="Launch a Something" runat="server">                       
             <ContentTemplate>
                <CRWP:ucLaunchSomething id="ucLaunchSomethingCtl" runat="server"></CRWP:ucLaunchSomething>
              </ContentTemplate>
          </telerik:RadPanelItem>
          <telerik:RadPanelItem runat="server" Text="Launch a Something Else">                       
             <ContentTemplate>
                <CRWP:ucLaunchSomethingElse id="ucLaunchSomethingElseCtl" runat="server"></CRWP:ucLaunchSomethingElse>
             </ContentTemplate>
          </telerik:RadPanelItem>
       </Items>
    </telerik:RadPanelBar>

    When the above is rendered (in at least IE9), it throws a javascript error in the following line:

    z.style.width=(y-(x+w+v+6))+"px";


    One of the problems is that y == 0 at this point so it's trying to set the width to a negative number. JavaScript error in IE JavaScript Console is SCRIPT:87 Invalid argument.

    Any suggestions on how to make it work without throwing the javascript error would be greatly appreciated.

    Thanks



  2. Dimitar Terziev
    Admin
    Dimitar Terziev avatar
    1266 posts

    Posted 19 Jun 2013 Link to this post

    Hello Ben,

    Could you clarify which is the version of the controls that you are using? There has been such an issue, but it should be resolved in the latest version of our controls.

    Regards,
    Dimitar Terziev
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Ben
    Ben avatar
    2 posts
    Member since:
    Jun 2013

    Posted 19 Jun 2013 Link to this post

    Hi,

    We're using 2013.1.417.35.

    I will try updating them to the Q2 release to see if it fixes it.

    Thanks

    EDIT: After upgrade to 2013 Q2 problem has disappeared....for now.... ;)
Back to Top