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

HomeHomeGetting StartedGetting StartedNew to DNN Plat...New to DNN Plat...DNNTabstripDNNTabstrip
Previous
 
Next
New Post
6/8/2011 10:11 AM
 
Hi there,
I developed a custom module using the DNNTabstrip v. 1.5.3 into my old website DNN 4.7.
It has 4 tabs and it is working fine where every click of the tab do the postback, go to pageload and populate
the data for each tab properly. When the 4th tab is clicked an Edit button appears outside the Tabstrip.
When I click back to other tabs, the Edit button goes away which is how I designed it.

I recently upgraded to DNN 5.6.1 and has been getting an issue with the my custom Tabstrip
module. On initial click of each tab it does the postback, goest to page_load and populate
data correctly. On the 4th tab, the Edit button appears when clicked the first time. 
However, during the 2nd click of each tab, I notice that the postback is not working. Therefore
when the 4th tab has been cliced and the Edit button has appeared, it no longer go away even when
other tabs are clicked.
I believe the problem is due to the postback not working properly on 2nd click of each tab. It
was working before on the old DNN 4.7. One difference I noticed is that the new version of DNNTabstrip is v 2.2.2.
Any idea why the postback is no longer working properly or is this the way the new DNNTabstrip is designed?
Thanks.

Here is a snippet of my code:

ascx file:

<script language="javascript" type="text/javascript">


function tabClick()
{           
    /// TabClickFunction="tabClick" put this dnn tab script
    var pBlnFlag=true;
    
    var EmployeeDetailEdit = document.getElementById('<%=Panel4.ClientID %>');
    var JobDetailEdit = document.getElementById('<%=Panel6.ClientID %>');
    var PersonalEdit = document.getElementById('<%=Panel2.ClientID %>');
    var ShifBidEdit = document.getElementById('<%=PanelEditShiftBid.ClientID %>');
    
    var input_pHidTabIndexEdit = document.getElementById('<%=pHidTabIndexEdit.ClientID %>');
        input_pHidTabIndexEdit.value = "0"

      if (EmployeeDetailEdit) 
      {
                input_pHidTabIndexEdit.value = "1"
                // EmployeeDetail " + EmployeeDetailEdit + " " + pBlnFlag);
                               
      }
    else if (JobDetailEdit) 
            {
                    input_pHidTabIndexEdit.value = "2"                    
            } 
          else if (PersonalEdit)
                {
                       input_pHidTabIndexEdit.value = "3"
                } 
                else if (ShifBidEdit)
                {
                    input_pHidTabIndexEdit.value = "4"
                }
                else
                 {      
                 pBlnFlag=true;
                 } 
                 


   if (pBlnFlag==false) 
      {
      return false;
      false");
      } 
   else
      {
      return true;
      true");
      }
      return true;
}



<dnn:DNNTabStrip ID="tabStrip" runat="server" DefaultContainerCssClass="tabcontainer"
                            DefaultLabel-CssClassHover="tablabelhover" DefaultLabel-CssClassSelected="tablabelselected"
                            DefaultLabel-CssClass="tablabel" TabIndex="1"  ClientAPIScriptPath="/dnn56test/js/"
                            EnableTheming="True" TabRenderMode="Postback" TabClickFunction="tabClick"
                             DefaultLabel-CssClassDisabled="tablabel"
                            >
                            
                            <dnn:DNNTab ID="EDTab"  runat="server" Label-Text="Employee Details" TabCallbackPostMode="None"
                                CallBackType="Simple" TabRenderMode="Postback" >


code behind:

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load


            If Me.pHidPersonalTab.Value <> "0" Then
                If Me.pHidPersonalTab.Value = "Yes" Then
                    'hide personal tab 
                    PersonalTab_visible(False)
                Else
                    ' unhide personal tab 
                    PersonalTab_visible(True)
                End If


                Me.pHidPersonalTab.Value = "0"
                Return
            End If


            cmdStartCalendar.NavigateUrl = Common.Utilities.Calendar.InvokePopupCal(txtBox_emp_cvcStartDate)
            cmdEmpAnnCalendar.NavigateUrl = Common.Utilities.Calendar.InvokePopupCal(txtBox_emp_ann)
            cmdBdayCalendar.NavigateUrl = Common.Utilities.Calendar.InvokePopupCal(txtBox_emp_bday)
            Dim calendarText As String = "<img src='" + ResolveUrl("/images/calendar.png") + "' border='0'>"
            'Dim calendarText As String = "<img src='" + ResolveUrl("~/images/calendar.png") + "' border='0'>"
            cmdStartCalendar.Text = calendarText
            cmdEmpAnnCalendar.Text = calendarText
            cmdBdayCalendar.Text = calendarText


            ' Me.ObjectDataSource_Personal.SelectParameters("ions").DefaultValue = UserInfo.Username.Substring(11)
            pIons_id = Request.QueryString("Ions_id")
            CheckFor_Roles(IsManager_Admin_Roles) ' check for admin and manager Roles 


            'If Btn_add_submit.OnClientClick Then
            'Else
            'If tabStrip.TabClickFunction IsNot Nothing Then
            '    'Else
            SetTabs(Me.tabStrip.SelectedIndex)
            'End If


            'End If
            If Not Page.IsPostBack Then


                'SetTabs(Me.tabStrip.SelectedIndex)
                setEditableControls()


                Me.DDL_SelectEmployee.DataBind()
                'Me.DDL_SelectEmployee.SelectedValue = UserInfo.Username.Substring(11).ToLower()
                Me.DDL_SelectEmployee.Items.Insert(0, New ListItem("-- Select Associate --", ""))
                Me.DDL_SelectEmployee.Items(0).Attributes.Add("style", "color:blue;")
                Me.DDL_SelectEmployee.Items.Add(New ListItem("Adding New Associte", "New"))
                If (pIons_id <> "") Then
                    Me.DDL_SelectEmployee.SelectedValue = pIons_id
                    Edit_Mode()
                    Me.txtBox_emp_id.Focus()
                    Enable_Controls(False)
                ElseIf IsManager_Admin_Roles = False Then
                    Me.tabStrip.Visible = True
                    Me.DDL_SelectEmployee.SelectedValue = UserInfo.Username.Substring(11).ToUpper()
                    ReadOnly_Mode(False)
                Else
                    Me.tabStrip.Visible = False
                End If


                If Me.DDL_SelectEmployee.SelectedValue <> "" Then
                    'Dim IsManager_Admin_Roles2 As Boolean = IsManager_Admin_Roles
                    'pIons_id2 = Me.DDL_SelectEmployee.SelectedValue
                    'CheckFor_Roles(IsManager_Admin_Roles) ' check for admin and manager Roles 
                    Me.ObjectDataSource_JobFuncCheck.SelectParameters("ions_id").DefaultValue = Me.DDL_SelectEmployee.SelectedValue
                    jobfuncchecklist = Me.ObjectDataSource_JobFuncCheck.Select()
                    UserJobFuncCheckInfo = Nothing
                    For Each item As JobFuncCheckInfo In jobfuncchecklist
                        'If item.ions_id.Equals(Me.DDL_SelectEmployee.SelectedValue) Then
                        UserJobFuncCheckInfo = New JobFuncCheckInfo()
                        UserJobFuncCheckInfo = item
                        Exit For
                        'End If
                    Next
                    'Response.Write("<script language=javascript> IsManager_Admin_Roles: " & IsManager_Admin_Roles & "') </script>")
                    If (IsManager_Admin_Roles = False) And (UserJobFuncCheckInfo Is Nothing) Then
                        'If (UserJobFuncCheckInfo Is Nothing) Then
                        Me.tabStrip.Tabs(3).Visible = False
                    End If
                End If
            ElseIf Me.DDL_SelectEmployee.SelectedValue = "" Then
                Me.tabStrip.Visible = False
            Else
                Me.tabStrip.Visible = True
                'Me.DDL_SelectEmployee.SelectedValue = Me.DDL_SelectEmployee.SelectedValue


            End If


            setDDL_SelectEmployee_value()


            If Me.pHidTabIndexEdit.Value <> "0" Then
                'save data from previous tab which has a edit mode 
                SaveDataFromPrevTab()
            End If


            ' request 941
            Me.ddl_Job_Function.Attributes.Add("onchange", "JobFunctionSelectChanged()")


        End Sub
 
Previous
 
Next
HomeHomeGetting StartedGetting StartedNew to DNN Plat...New to DNN Plat...DNNTabstripDNNTabstrip


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