none
Need help with showing tab info when first landing on page.

    Question

  • I have two tabs:Customer and Contract. When I land on the page I want to show the Customer tab info but with my current code I'm unable to get it to work.

    aspx

    <nav id="spy">
                    <ul class="sidebar-nav nav">
                        <li><a href="javascript:void(0)" class="tablinks" onclick="openCity(event, 'Customer')">Customer</a></li>
                        <li><a href="javascript:void(0)" class="tablinks" onclick="openCity(event, 'Contract')">Contract</a></li>
                     
                    </ul>
                </nav>
    
    <div class="col-sm-8" style="margin-left: 0px; width: 711px;">
                    <div class="row">
                        <div class="col-md-12 well tabcontent" id="Customer" style="width:546px">
                            <legend >Customer Selection</legend>
                            <div class="row">
                              <div class="col-md-5 spacing">Customer Source Code:</div>
                              <%--<div class="col-md-4""><asp:Label ID="lblCustSourceCode" runat="server" Text="Label" name="lblCustSourceCode"></asp:Label></div>--%>
                              <div class="col-md-4"">832 - NASA</div>
                            </div>
                            <div class="row">
                              <div class="col-md-5 spacing">Customer Code:</div>
                              <%--<div class="col-md-4""><asp:Label ID="lblCustCode" runat="server" Text="Label" name="lblCustCode"></div>--%>
                              <div class="col-md-4">555</div>
                            </div>
                            <div class="row">
                              <div class="col-md-5 spacing">Name:</div>
                              <%--<div class="col-md-4""><asp:Label ID="lblName" runat="server" Text="Label" name=""lblName"></div>--%>
                              <div class="col-md-4">Aeronautics Lab</div>
                            </div>
                            <div class="row">  
                              <div class="col-md-5 spacing">City:</div>
                              <%--<div class="col-md-4""><asp:Label ID="lblCity" runat="server" Text="Label" name="lblCity"></div>--%>
                              <div class="col-md-4">Houston</div>
                            </div>
                            <div class="row">  
                              <div class="col-md-5 spacing">State:</div>
                              <%--<div class="col-md-4""><asp:Label ID="lblState" runat="server" Text="Label" name="lblState"></div>--%>
                              <div class="col-md-4">Texas</div>
                            </div>
                            <div class="row">  
                              <div class="col-md-5 spacing">Zip:</div>
                              <%--<div class="col-md-4""><asp:Label ID="lblZip" runat="server" Text="Label" name="lblZip"></div>--%>
                              <div class="col-md-4">10001</div>
                            </div>
                        </div>
                    </div>
    
                    <div class="row">
                        <div class="col-md-12 well hi tabcontent" style="width:546px;" id="Contract">
                            <legend >Contract Information</legend>
                           <div class="row">
                              <div class="col-md-5 spacing">Nasa Control Number:</div>
                              <div class="col-md-4">4416367</div>
                            </div>
                            <div class="row">
                              <div class="col-md-5 spacing">Prime Contact Number<span style="color:red">*</span>:</div>
                              <div class="col-md-4">4416367</div>
                            </div>
                            <div class="row">
                              <div class="col-md-5 spacing">Contract Start Date:</div>
                              <div class="col-md-4">10/30/2016</div>
                            </div>
                            <div class="row">  
                              <div class="col-md-5 spacing">Face Value of Contact<span style="color:red">*</span>:</div>
                              <div class="col-md-4">10/30/2016</div>
                            </div>
                            <div class="row">
                              <div class="col-md-5 spacing">Contract End Item or Service:</div>
                              <div class="col-md-4">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
                              tempor incididunt. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
                              tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
                              quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
                              consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
                              cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
                              proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</div>
                            </div>
                            <div class="row">  
                              <div class="col-md-5 spacing">Authorize Redelegation<span style="color:red">*</span>:</div>
                              <div class="col-md-4">YES</div>
                            </div>
                            <div class="row">  
                              <div class="col-md-5 spacing">Estimated LOD Completion Date<span style="color:red">*</span>:</div>
                              <div class="col-md-4">10/30/2016</div>
                            </div>
                            <div class="row">  
                              <div class="col-md-5 spacing">Is your LOD ONLY for one specific Purchase Order or Delivery Order:</div>
                              <div class="col-md-4">No</div>
                            </div>
                            <div class="row">  
                              <div class="col-md-5 spacing">Contracting Officer:</div>
                              <div class="col-md-4">John G. Doe</div>
                            </div>
                            <div class="row">  
                              <div class="col-md-5 spacing">Date LOD Signed by Customer/Contracting Officer<span style="color:red">*</span>:</div>
                              <div class="col-md-4">08/11/2016</div>
                            </div>
                        </div>
                    </div>

    js

    $(document).ready(function(){
    
        /*Page Initialization*/
        $(".custinfo").toggleClass("active");
        $("#custinfo").show();
        $("#continfo").hide();
        $("#prime").hide();
        var setHeight = $("#custinfo").outerHeight();
        $("#spy").css('height', setHeight);        
        $(".sidebar-nav").css('height', setHeight);
    
        /*sidebar height*/
         
    
        $('#popover-button').popover({
        	html: true,
        	trigger: "hover",
            content: function(){
            	return $('#popover-content').html();
            }
        });
    
        $('#popover-button').click(function () {
            $('.modal').modal('show');  
            $('#popover-content').popover('hide'); //EDIT: added this line to hide popover on button click.
        });
    
    
        /*Menu-toggle*/
        $("#menu-toggle").click(function(e) {
            e.preventDefault();
            $("#wrapper").toggleClass("active");
    
        });
    
        /*sidebar link*/
        $(".custinfo").click(function(e) {
            e.preventDefault();
            $("#custinfo").show();
            $("#continfo").hide();
            $("#prime").hide();
            var setHeight = $("#custinfo").outerHeight();
            $("#spy").css('height', setHeight);
            $(".sidebar-nav").css('height', setHeight);
    
        });    
    
        $(".continfo").click(function(e) {
            e.preventDefault();
            $("#custinfo").hide();
            $(".custinfo").removeClass("active");
            $("#continfo").show();
            $("#prime").hide();
            var setHeight = $("#continfo").outerHeight();
            $("#spy").css('height', setHeight);
            $(".sidebar-nav").css('height', setHeight);
    
        }); 
     /*Scroll Spy*/
        $('body').scrollspy({ target: '#spy', offset:80});
    
        /*Smooth link animation*/
        $('a[href*=#]:not([href=#])').click(function() {
            if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') || location.hostname == this.hostname) {
    
                var target = $(this.hash);
                target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
                if (target.length) {
                    $('html,body').animate({
                        scrollTop: target.offset().top
                    }, 1000);
                    return false;
                }
            }
        });
    
    });
    
    
    $(window).bind('resize', function(){
    });
    

    Sunday, November 06, 2016 7:16 AM

Answers

  • They'll help you over here in microsoft official ASP.Net forums.

    https://forums.asp.net/

     

     

     



    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows Server] Datacenter Management

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.

    Sunday, November 06, 2016 1:06 PM
    Moderator

All replies

  • They'll help you over here in microsoft official ASP.Net forums.

    https://forums.asp.net/

     

     

     



    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows Server] Datacenter Management

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.

    Sunday, November 06, 2016 1:06 PM
    Moderator
  • They'll help you over here in microsoft official ASP.Net forums.

    https://forums.asp.net/

     

     

     



    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows Server] Datacenter Management

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.

    Yeah this is not helpful. I'm looking for someone ON THIS BOARD to actually help me and not provide a link to another board.
    Sunday, November 06, 2016 10:14 PM
  • This is "where is" forum for direction on where best to ask questions. You'll need to ask in forums that supports the technology.

     

     



    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows Server] Datacenter Management

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.


    Sunday, November 06, 2016 10:19 PM
    Moderator
  • Yeah this is not helpful. I'm looking for someone ON THIS BOARD to actually help me and not provide a link to another board.

    Hello,

    That's like going to a Chevrolet Corvette forum and demanding help on your Chevrolet Impala.

    Microsoft's MSDN and TechNet forums do not discuss ASP.Net issues.

    Microsoft oddly named forums.asp.net forums DO however.

    Nowhere "ON THIS BOARD" is the correct place to ask.

    Karl


    When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
    My Blog: Unlock PowerShell
    My Book: Windows PowerShell 2.0 Bible
    My E-mail: -join('6D73646E5F6B61726C406F75746C6F6F6B2E636F6D'-split'(?<=\G.{2})'|%{if($_){[char][int]"0x$_"}})

    Monday, November 07, 2016 9:25 PM
    Moderator