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

HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Enable-Disable DNN jQuery Tab ControlEnable-Disable DNN jQuery Tab Control
Previous
 
Next
New Post
4/1/2015 7:14 AM
 

I'm using DNN jQuery Tab Control (http://uxguide.dotnetnuke.com/UIPatterns/Tabs.aspx) in my module. I have 2 tabs on my module page. 1st one enabled and 2nd one is disabled while user come to the page. Once user fill up form in 1st tab and click on NEXT button, user moved to 2nd tab and make it to enabled.

Is it possible to play like this with DNN jQuery Tab Control???


- Keval
 
New Post
4/1/2015 9:43 AM
 

Keval,

this should be possible, even if I am not sure what you mean by enabled and disabled. You can disable all the input controls from the second tab, and then do a postback that enables them, and disables the ones from the first tab.

To activate a specific tab when loading the page, you can use the following code:

      private void SetCurrentTab(string tabID)
      {
         // tabID = "0": First Tab
         //         "2": Second Tab
         string cookieName = String.Format("dnnTabs-{0}", MYTABS.ClientID);
         HttpCookie tabCookie = new HttpCookie(cookieName);
         tabCookie.HttpOnly = false;
         tabCookie.Path = "/";
         tabCookie.Value = tabID;
         Response.Cookies.Add(tabCookie);
      }

Replace MYTABS with the ID of the surrounding div from the ascx file, eg.

<div class="dnnForm" id="MYTABS" runat="server">
   <ul class="dnnAdminTabNav">
   etc.

Happy DNNing!
Michael


Michael Tobisch
DNN★MVP
dnn-Connect.org - The most vibrant community around the DNN-platform
 
New Post
4/1/2015 10:39 AM
 

Thanks Michael, Sorry but I do not understand why we need cookie to enabled-disabled tabs.

 Here is my requirement, review this screen shot, you will get some idea what i need...

 In the screen shot, you see the 2 tabs "General", "Meta Tags". When my module loads first time on the browser, user can see the "General" tab enabled and "Meta tags" tab disabled. User can't access "Meta tags" tab without fill up all required fields on "General" tab and save required data into database.

Please let me know if you have any questions.

 

 


- Keval
 
New Post
4/1/2015 10:45 AM
 
jQuery is a client side technology - it all happens with javascript at the browser.

The tab control uses a cookie to remember which tab it is displaying. So if you want to override that in your server side code you do it by sending a cookie.

Best wishes,
- Richard
Agile Development Consultant, Practitioner, and Trainer
www.dynamisys.co.uk
 
New Post
4/2/2015 1:38 AM
 

Hi,

I could not have explained it in a better way than Richard.

And there is a little typo in my code over there, it should read "1" for the second tab, of course.

Happy DNNing!
Michael

 


Michael Tobisch
DNN★MVP
dnn-Connect.org - The most vibrant community around the DNN-platform
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Enable-Disable DNN jQuery Tab ControlEnable-Disable DNN jQuery Tab Control


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.

Content Layout

Subscribe to DNN Digest

DNN Digest is our monthly email newsletter. It highlights news and content from around the DNN ecosystem, such as new modules and themes, messages from leadership, blog posts and notable tweets. Keep your finger on the pulse of the ecosystem by subscribing.  


Copyright 2017 by DNN Corp Terms of Use Privacy
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out