WebTab - Error with dynamically created tabs

2 replies. Last post: November 15, 2011 12:17 AM by Jean Nguimbus
Tags :
  • New Discussion
  • New Question
  • New Product Feedback

Hello,

I am adding tabs at client side from preset values (i.e., not using tabindex) in hyperlinks.  Basically the user clicks on a hyperlink, and a tab is created with a specific page loading in that new tab.

The problem is that clicking again on a hyperlink that has its tab still present in the collection raises this error: " WebTab Exception: Specirfied name "xyz" alread exists in TabPages collection".

I need to block this error and, instead, provide one or both of the following two solutions:

  1. Raise a simple alert that simply tells the user: "This tab is already open"; and/or 
  2. Simply return the focus on the existing tab, if found in the colletion, instead of trying to create it.

I have attached a simplified working project (just open DynamicTab.aspx and use the hyperlinks on the left pane to create the tabs).   

I would greatly appreciate if you could modify the script provided in DynamicTab.aspx so as to raise an alert and/or make the existing tab active, instead of throwing an Exception.

Regards.

Jean 

 

 

I have attached a simplified working project 

1 attachment
All times are GMT -5. The time now is 2:54 PM.
Previous Next