Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesdnnTabs - Programmatically select a tab?dnnTabs - Programmatically select a tab?
Previous
 
Next
New Post
4/17/2013 3:29 PM
 
I used this successfully to select a specified tab. This code selects tab 1. i.e the second tab.

Page.ClientScript.RegisterStartupScript(this.GetType(), "settab", "jQuery(function ($) {$('#race-tabs').tabs('select', 1);});", true);

 
New Post
7/17/2013 11:06 AM
 

Hi  LOKHEED

Thanks for your code. 

Regards,

sathishmarappan

 
New Post
3/20/2014 5:03 PM
 

Here's one more - in my case - whenever the page is loaded I want the first tab to be selected.

$("#tabs").dnnTabs().tabs('select',0);



Andrew Walker

Learn to make your own beer and wine at homeIf you enjoy making your own beer and/or wine - be sure to check out http://www.ForemostBrewing.com
 
New Post
5/26/2014 9:32 AM
 
Lokheed wrote:
I solved this problem, so I thought I should come back and post my solution for anyone else trying to do the same thing.

[...]

Thanks a lot for this, Lokheed! Works great!

Only a bit of code for those who want to use it without knowning the name of the cookie: First set the attribute runat="server" to the div containing the unordered list with the links to the tabs:

<div id="MyTabs" class="dnnForm" runat="server">

or

<asp:Panel ID="MyTabs" CssClass="dnnForm" runat="server">

Then use the following code-behind to find the cookie name:

string cookieName = String.Format("dnnTabs-{0}", MyTabs.ClientID);

Best wishes
Michael

 


Michael Tobisch
DNN★MVP

dnn-Connect.org - The most vibrant community around the DNN-platform
 
New Post
5/26/2014 1:34 PM
 

Of course, if you don't use the "runat" attribute, you may avoid it, but you need an id for the div element:

<div class="dnnForm" id="MyTabs">

Then the name of the cookie should be

string cookieName = String.Format("dnnTabs-{0}", "MyTabs");

Best wishes

Michael


Michael Tobisch
DNN★MVP

dnn-Connect.org - The most vibrant community around the DNN-platform
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesdnnTabs - Programmatically select a tab?dnnTabs - Programmatically select a tab?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out