Two tables and two functions but only one work at a time. Whenever both functions are run at the same time, only one table works

Uni-Thirft
<!--Connects to the css file-->
    <link href = "style3.css" rel ="stylesheet" type = "text/css">   
	<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
	<link rel="stylesheet" href="https://fontawesome.com/v6/docs/web/setup/get-started">
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
<div class="header">
	
 <!-- Navigation Bar-->
    <nav>
	<!-- This is our logo picture-->
        <a href ="homepage.html"><img  src="media/logo1.png" class="logo"></a> 
		<a href ="homepage.html"><img  src="media/logo2.png" class="logo2"></a>
        
            <!-- Navigation Bar Items-->
	<ul class="nav-links">                    
                <!--All the header tabs-->
                <li><a href="test1.html">Home</a></li>                
                <li><a href="">Products</a></li> 
                <li><a href="about.html">About</a></li> 
				<li><a href="demographics.html">My Account</a></li>
				<li><ion-icon name="cart-outline"></ion-icon></li>
				
                        
            </ul>          
    </nav>
</div>
<!--Account Management option such as personal information, payment, orders, selling items-->
<div class="topbox">
	<nav>
		<a onclick="tabs(0)" class="tab0 active">
			<i class="fa fa-user-circle" aria-hidden="true" title="User Demographics"></i>
        
		</a>

		<a onclick="tabs(1)" class="tab1"> 
			<i class="fa fa-credit-card" aria-hidden="true" title="Payment"></i>
          
		</a>

        <a onclick="tabs(2)" class="tab2"> 
			<i class="fa fa-shopping-basket" aria-hidden="true" title="Purchase History"></i> 
            
		</a>

        <a onclick="tabs(3)" class="tab3"> 
			<i class="fa fa-tags" aria-hidden="true" title="Items Being Sold"></i> 
            
		</a>

        <a onclick="tabs(4)" class="tab4"> 
			<i class="fa fa-history" aria-hidden="true" title="Items Sold"> </i> 
            
		</a>

	</nav>

</div>




<!--Information on the bottom side of the screen(body) for profile-->
<div class="lowerbox">

    <!--Class to get photo uploaded on profile-->
   <!-- <div class="profile-photo">
        <img src="media/logo1.png" id="photo">
        <input type="file" id="file">
        <label for="file" id="uploadBtn">Choose Photo</label>
        
    </div>-->



    

	<!--For the profile information-->
	<div class="profile tabShow">

		<h1> Personal Information </h1>
        <!--<h2> ID</h2>
		<input id ="enterID" type="text">-->
		<h2> First Name </h2>
		<input id ="enterFirstName" type="text" placeholder="Enter First Name">
        <h2> Last Name </h2>
		<input id ="enterLastName" type="text" placeholder="Enter Last Name"> 
		<h2> Birthday</h2>
		<input id="enterBirthday" type="text" placeholder="Enter Birthday"> 
		<h2> Gender </h2>
		<input id="enterGender" type="age" placeholder="Enter Gender">
		<h2> UserName </h2>
		<input id="enterEmail" type="text" placeholder="Enter User Name">
		<h2> Password </h2>
		<input id="password" type="password" value="brightcode">
		<button id ="insert"> Insert/Update </button>
	
	</div>

    
		

		
    <!---------------------Start of Payment Information Tab------------------------>
	<div class="payment tabShow">
		<h1> Payment Information </h1>
		<h2> Name on Credit Card </h2>
		<input type="Text" class="input" value="Jorge M Torres ">
		<h2> Credit Card Number </h2>
		<input type="Text" class="input" value="0123 **** **** 4567 ">
		<h2> Expiration Date </h2>
		<input type="Text" class="input" value="01/02/2025">
		<h2> CVV Number</h2>
		<input type="Text" class="input" value="123">
		<h2> Billing Address </h2>
		<input type="text" class="input" value="123 4th Ave Bay Shore NY">
		<button id ="btn"> Update </button>
	</div>
    <!---------------------Start of Payment Information Tab------------------------>






    <!---------------------Start of Order History Tab------------------------------->
    <div class="order tabShow">
	
        
        <h1> Order History </h1>
	

        <div>
            <table class="t ">
                <thead>
                    <tr>
                    <th>Order Number</th>
                    <th>Image</th>
                    <th>Date Purchased</th>
                    <th>Product Name</th>
                    <th>Price</th>
                    </tr>
                </thead>
    
    
                <tbody id = "tbody">
                    <tr>
                        <td></td>
                        <td></td>
                        <td></td>
                        <td></td>
                        <td></td>
                    </tr>
                </tbody>
            </table>
        </div>
	</div>
    <!---------------------End of Order History Tab------------------------------->







    <!------------------- Start of Items Being Sold Tab--------------------------->
    <div class="selling tabShow">
		<h1> Items Being Sold </h1>
	
        <button id ="sellItemBtn" onclick="sellItem()" class="btn1"> Add New Item to Sell </button>
		<h2> Name of Item </h2>
		<input type="Text" class="input" placeholder="HTML, CSS Textbook">
		<h2> Category </h2>
		<input type="Text" class="input" placeholder="Textbook">
		<h2> Condition </h2>
		<input type="Text" class="input" placeholder="Used">
		<h2>Price</h2>
		<input type="Text" class="input" placeholder="9.99">
      
	
    </div>
    <!------------------- End of Items Being Sold Tab----------------------------->


    <!--------------------Start of Products Already Sold Tab---------------------->
    <div class="sold tabShow">
		<h1> Items Sold </h1>

        <div>
            <table class="t">
                <thead>
                    <tr>
                    <th>Product Name</th>
                    <th>Image</th>
                    <th>Upload Date</th>
                    <th>Price</th>
                    <th>Condition</th>
                    <th>Description</th>
                    </tr>
                </thead>
    
    
                <tbody id = "tbody1">
                    <tr>
                        <td></td>
                        <td></td>
                        <td></td>
                        <td></td>
                        <td></td>
                        <td></td>
                    </tr>
                </tbody>
            </table>
        </div>
	</div>
    <!--------------------Start of Products Already Sold Tab---------------------->





    <!----------JavaScript for the upload photo feature------
    <script src="photo.js"></script>-->


</div>	  
<ul class="social-icon">
  <li class="social-icon__item"><a class="social-icon__link" href="https://www.facebook.com/">
      <ion-icon name="logo-facebook"></ion-icon>
    </a></li>
  <li class="social-icon__item"><a class="social-icon__link" href="https://twitter.com/">
      <ion-icon name="logo-twitter"></ion-icon>
    </a></li>
  <li class="social-icon__item"><a class="social-icon__link" href="https://www.instagram.com/uni.thrift.1/">
  
      <ion-icon name="logo-instagram"></ion-icon>
    </a></li>
</ul>
<ul class="menu">
  <li class="menu__item"><a class="menu__link" href="#">Home</a></li>
  <li class="menu__item"><a class="menu__link" href="#">Products</a></li>
  <li class="menu__item"><a class="menu__link" href="#">FAQ</a></li>
  <li class="menu__item"><a class="menu__link" href="#">Contact</a></li>

</ul>
<p>&copy;2023 Uni-Thrift | All Rights Reserved</p>

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.