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

  • SEARCH
  • Home
  • 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 7183801
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T18:04:12+00:00 2026-05-28T18:04:12+00:00

Hi Initally tab1 is enabled and tab2,tab3 are in disable mode. by clicking 1st

  • 0

Hi Initally tab1 is enabled and tab2,tab3 are in disable mode. by clicking 1st checkbox in tab1 then tab2 will be enabled and i will go to 2nd tab and if i will uncheck the checkbox in tab1 then tab2 will be disabled. Same operation for 2nd checkbox. In fiddle it is working but in my netbeans ide it is not working why? I have kept javascript inside head and html inside body. In fiddle: http://jsfiddle.net/AavsW/14/

What should i do to get it worked in my ide?

In ide i have written like this:

<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>JSP Page</title>

<script type="text/javascript">

      $(document).ready(function() {
$('#wizard').tabs({ disabled: [1, 2] });

// when checkbox is clicked
$('.terms').click(function() {
    // get tab id
    var iTab = $(this).data('tabid');
    // is checkbox checked
    if ($(this).is(':checked')) {
        // enable tab
        $('#wizard').tabs('enable', iTab);
        // select tab
        $('#wizard').tabs('select', iTab);
    } else {
        // disable tab
        $('#wizard').tabs('disable', iTab);
        // empty textarea on the disabled tab
        $('#tab' + (iTab + 1) + ' .text').val('');
    }
});
});

    </script>
</head>
<body>
<form name="frm">
<div id="wizard">
<ul>
    <li><a href="#tab1">tab 1</a></li>
    <li><a href="#tab2">tab 2</a></li>
    <li><a href="#tab3">tab 3</a></li>
</ul>
<div id="tab1">
    <input type="checkbox" class="terms" data-tabid="1" onclick="" /> Terms 1<br />
    <input type="checkbox" class="terms" data-tabid="2" /> Terms 2
</div>
<div id="tab2"><textarea class="text"></textarea></div>
<div id="tab3"><textarea class="text"></textarea></div>
</div>
</form>
</body>
</html>
  • 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-28T18:04:13+00:00Added an answer on May 28, 2026 at 6:04 pm

    Have you tested in browser, Are all styles and javascripts are taken as input…? May not be.

    Test below test HTML file with your script. It is working same as jsfiddle.

    <html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
                <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.3/jquery.min.js"></script>
             <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.17/jquery-ui.min.js"></script> 
            <script src="http://jqueryui.com/ui/jquery.ui.widget.js"></script>
            <link rel="stylesheet" href="http://jqueryui.com/themes/base/jquery.ui.core.css">
            <link rel="stylesheet" href="http://jqueryui.com/themes/base/jquery.ui.theme.css">  
                    <link rel="stylesheet" href="http://jqueryui.com/themes/base/jquery.ui.tabs.css">
            <link rel="stylesheet" href="http://jqueryui.com/demos/demos.css">
            <title>JSP Page</title>
    
    <script type="text/javascript">
          $(document).ready(function() { 
                $('#wizard').tabs({ disabled: [1, 2] });
                $('.terms').click(function() {
    
                var iTab = $(this).data('tabid');                   
                if ($(this).is(':checked')) {
    
                            $('#wizard').tabs('enable', iTab);
    
                            $('#wizard').tabs('select', iTab);
                } else {
                            $('#wizard').tabs('disable', iTab);
                            $('#tab' + (iTab + 1) + ' .text').val('');
                }
            }); 
        });
    </script>
    </head>
    <body>
    <form name="frm">
            <div id="wizard">
                    <ul>
                        <li><a href="#wizard-1">tab 1</a></li>
                        <li><a href="#wizard-2">tab 2</a></li>
                        <li><a href="#wizard-3">tab 3</a></li>
                    </ul>
    
                    <div id="wizard-1">
                        <input type="checkbox" class="terms" data-tabid="1" onclick="" /> Terms 1<br />
                        <input type="checkbox" class="terms" data-tabid="2" /> Terms 2
                    </div>
    
                    <div id="wizard-2"><textarea class="text"></textarea></div>
    
                    <div id="wizard-3"><textarea class="text"></textarea></div>
            </div>
    </form>
    </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a 64bit Vista laptop. Initally, I tried to Install a 64bit version
I am using tab view in one of my activity. I want to change
I am using JQuery UI tabs , to get the current selected tab i
I can open a Terminal tab using the following AppleScript: tell application Terminal set
there is known issue with loading a flot chart in a jquery tab that
I have some html snippet which is initally hidden <p style=float: left; position: relative;
I have a jquery tab container, in which there are two tabs. Now what
I have a WPF window with a tab control, and I'm defining the TabItems
So when I initally use .append to append a string variable in javascript myvar
I've got the following declared: set :sessions, true and then in my controller, I

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.