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

Invisible tabs cause javascript error

3 Answers 66 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Larkin Young
Top achievements
Rank 2
Larkin Young asked on 27 Jul 2008, 05:31 AM
I didn't have time to create a test project to reproduce this at the moment, but I thought I would give you a heads up anyway. It seems that setting the Visible property of a tab to false results in a javascript error on page load (client). The error is "'this._element' is null or not an object" and in debugging it appears that this occurs in the set_element function. A couple points that might help you reproduce the issue:
  • using latest release (Q2 2008 ASP.NET AJAX)
  • setting Visible property of tab in the TabCreated event handler
  • NavigateUrl property is empty
  • TabStrip.AutoPostback is true
  • Added 2 custom attributes, "Caption", and "NavigateUrl" (I need the url but need the tab to postback, not redirect as a link, hence adding the url as a custom attribute)
To workaround the issue, I am raising a custom event before adding the tab to the tabstrip, and if the calling code wants to hide the tab I simply do not add it to the tabstrip rather than setting the Visible property to false. This fixes the problem but I'm sure there is a bug in there somewhere.

Thanks,
Larkin

3 Answers, 1 is accepted

Sort by
0
Remi
Top achievements
Rank 2
answered on 30 Jul 2008, 08:00 PM
Hello,

I'm experiencing the same issue. I installed Q2 2008 and still experience the issue. I experienced it previously as well.

The issue happens occationally, not all the time.

Just wanted to let you know your not a lone in suffering from this issue. ;)

Thanks for the suggestions,

Cheers!
0
Paul
Telerik team
answered on 31 Jul 2008, 11:35 AM
Hi there,

Unfortunately, the provided information does not help us much in reproducing the error. I'm afraid we could not be of much help unless we reproduce the issue on our side. It will be best if one of you can open a support ticket and send us a simple running project (incl. your custom skin, CSS, images, DB backup if needed and so on) demonstrating the problem (and step-by-step instructions on doing so). In that way we can reproduce and pinpoint the problems you're facing on our side, understand the logic of your application and provide a solution.

Greetings,
Paul
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Neil N
Top achievements
Rank 1
Iron
Veteran
Iron
answered on 08 Aug 2008, 08:32 PM
Same thing here.  I've narrowed it down to only happening when the first tab on a tabstrip is hidden.
Tags
TabStrip
Asked by
Larkin Young
Top achievements
Rank 2
Answers by
Remi
Top achievements
Rank 2
Paul
Telerik team
Neil N
Top achievements
Rank 1
Iron
Veteran
Iron
Share this question
or