Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6625473
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T21:46:45+00:00 2026-05-25T21:46:45+00:00

I have five tabs right now: New Reports, Old Reports, Judges, Users, and Other

  • 0

I have five tabs right now: New Reports, Old Reports, Judges, Users, and Other Settings. When Judges or Users is clicked, there’s a list of users or judges as well as a button that allows you to “Add New User” or “Add New Judge”. When one is clicked, that button becomes invisible and some text boxes appear. After you save (or decide to cancel) your new judge or user, the “Add New” button reappears. This all works quite well aside from the fact that if you click the “Judges” or “Users” tab again, the “Add New Button” will appear again even if you’re in the process of adding a new one. I’m trying to figure out the best way to prevent this from happening.

So far I’ve tried adding $(this).attr(‘disabled’, ‘disabled’); to the click event for Judges and Users, but I don’t think that’s exactly the right approach. Any ideas?

Code:

<div id="tabs" style="width:800px;margin: 0 auto;">
    <ul>

        <li><a href="#tabs-1" onClick="$('#newJudgeLink').hide(); $('#newUserLink').hide();">New Reports</a></li>
        <li><a href="#tabs-2" onClick="$('#newJudgeLink').hide(); $('#newUserLink').hide();">Old Reports</a></li>
        <li><a href="#tabs-3" onClick="$('#newJudgeLink').show(); $('#newUserLink').hide();">Judges</a></li>
        <li><a href="#tabs-4" onClick="$('#newJudgeLink').hide(); $('#newUserLink').show();">Users</a></li>
        <li><a href="#tabs-5" onClick="$('#newJudgeLink').hide(); $('#newUserLink').hide();">Other Settings</a></li>
        </ul>

        <div style="float:right;"><button id="newUserLink" style="display:none;"                    onClick="return false;">Add New User</button></div>
        <div style="float:right;"><button id="newJudgeLink" onClick="return false;" style="display:none;">Add New Judge</button></div>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T21:46:46+00:00Added an answer on May 25, 2026 at 9:46 pm

    well first I would recommend binding click events in the traditional Jquery fashion instead of using onClicks embedded in your HTML.

    So what you could do is show() your save button when the tab is clicked, hide it if itself is clicked, and show it when the save/submit/cancel (i dont see them up there) button is clicked like so:

    $("a[href$=#tabs]").click(function(){
         $("a[href$=#tabs]").removeClass("active");
         $(this).addClass("active");
         if ($(this).attr("href") == "#tabs-3" && !($(this).hasClass("active"))){
               $('#newJudgeLink').show();
               $('#newUserLink').hide();
         }
         else if ($(this).attr("href") == "#tabs-4" && !($(this).hasClass("active"))){
               $('#newUserLink').show();
               $('#newJudgeLink').hide();
         }
         else{
               $('#newJudgeLink').hide();
               $('#newUserLink').hide();
         }
    });
    
    $("#yourSaveButton,#yourCancelButton").click(function(){
            if ($("a.active").attr("href") == "#tabs-3"){
               $('#newJudgeLink').show();
               $('#newUserLink').hide();
            }
            else{
               $('#newUserLink').show();
               $('#newJudgeLink').hide();
            }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have five divs on my page (#art #fashion, #self, #nightlife, #community). right now,
Is there a way to have five columns in an asp.net data list and
I have been away from BCB for over five years, and now I am
I have five tabs in my main window, but I haven't created it programmatically.
I am developing a tab bar application. I have five tabs in it. For
I am developing an android application in which i have created five tabs and
Okay, what I currently have is a TabBarController with five tabs. Each of these
I have five lists List<String> . I want to get a single array which
I am creating an app in which I have five tabs. I need to
I have an app that uses a tab bar controller. It has five tabs.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.