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 7801303
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T00:54:21+00:00 2026-06-02T00:54:21+00:00

In the code branch below, when the my_theme select menu is changed, I’m making

  • 0

In the code branch below, when the “my_theme” select menu is changed, I’m making a few $get calls to the server to retrieve the selected theme’s default color options and preview images. During this process, to avoid the user clicking the “Apply Changes” button before the colors are loaded, I’m setting that button to disabled, then resetting it after the operation is done.

However, on one installation, something is apparently failing and the button stays disabled (even though there is no apparent error in the get operations).

How might I better structure this to renable the submit button after the gets are all done?

$('#my_theme').change
(
    function()
    {
        $("#largePreview").hide();
        var myImage = $('#my_theme :selected').val();
        var thisOption = $(this);
        $('.selectedImage img').attr('src','<?php echo get_bloginfo('template_directory') ?>/styles/'+myImage+'/screenshot.jpg');
        $('.selectedImage img').attr('alt',myImage);

        try{
            $('button.save').attr('disabled','disabled');
            $.get('<?php echo get_bloginfo('template_directory') ?>/color.php', {theme: myImage, spot: '1'}, function(data){doColor('#my_theme_header_color', data);});
            $.get('<?php echo get_bloginfo('template_directory') ?>/color.php', {theme: myImage, spot: '2'}, function(data){doColor('#my_theme_sidebar_color', data);});
            $.get('<?php echo get_bloginfo('template_directory') ?>/color.php', {theme: myImage, spot: '3'}, function(data){doColor('#my_theme_spot_color_alt', data);});
            $.get('<?php echo get_bloginfo('template_directory') ?>/color.php', {theme: myImage, spot: '4'}, function(data){doColor('#my_theme_spot_color_alt2', data);});
            $.get('<?php echo get_bloginfo('template_directory') ?>/color.php', {theme: myImage, spot: '5'}, function(data){doColor('#my_bg_attach_color', data);});
        }
        catch(e){
            $('button.save').attr('disabled','');
        }
        $.get('<?php echo get_bloginfo('template_directory') ?>/get-image.php', {template: myImage, action: 'background'}, function(data){
            if(data){$('#currentBackgroundImage').attr('src','<?php echo get_bloginfo('template_directory') ?>/styles/'+myImage+'/background.png');}
            else{$('#currentBackgroundImage').attr('src','<?php echo get_bloginfo('template_directory') ?>/background-missing.png');}
        });

        $.get('<?php echo get_bloginfo('template_directory') ?>/get-image.php', {template: myImage, action: 'header'}, function(data){
            if(data){$('#currentHeaderImage').attr('src','<?php echo get_bloginfo('template_directory') ?>/styles/'+myImage+'/header.png');}
            else{$('#currentHeaderImage').attr('src','<?php echo get_bloginfo('template_directory') ?>/header-missing.png');}

            $('button.save').attr('disabled','');

        });

});
  • 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-06-02T00:54:23+00:00Added an answer on June 2, 2026 at 12:54 am

    Try either setting the attribute to false:

    $('button.save').attr('disabled', false);
    

    Or removing it:

    $('button.save').removeAttr('disabled');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've created this code branch so that if the permalink settings do no match
When you branch some code, finish working with the branch, and merge it back
My problem is that The code in the branch I'm working in for some
I am writing code in Java where I branch off based on whether a
For various reasons (code review mostly) I need to switch from current development branch
If I had to following file on my development branch: # file.rb class Code
Code for server: http://stikked.com/view/64826511 Network Code for client: http://stikked.com/view/38974838 Basically, the client connects to
Here in the below code i need some info on cloning there is a
Yesterday I did one of these operations (see code snippet below) on my git
I am trying to insert values into Oracle 10g database using the code below

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.