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

RadSearchBox javascript error when inside container with display:none

2 Answers 49 Views
SearchBox
This is a migrated thread and some comments may be shown as answers.
Ben
Top achievements
Rank 1
Ben asked on 18 Jun 2013, 09:37 PM
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 Answers, 1 is accepted

Sort by
0
Dimitar Terziev
Telerik team
answered on 19 Jun 2013, 06:38 AM
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.
0
Ben
Top achievements
Rank 1
answered on 19 Jun 2013, 03:37 PM
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.... ;)
Tags
SearchBox
Asked by
Ben
Top achievements
Rank 1
Answers by
Dimitar Terziev
Telerik team
Ben
Top achievements
Rank 1
Share this question
or