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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T00:44:35+00:00 2026-05-25T00:44:35+00:00

I am currently using jQuery .click() method to update 15 text fields with simple

  • 0

I am currently using jQuery .click() method to update 15 text fields with simple color hex values i.e. like this document.form1.top_menu_bgcolor.value = ‘#FFFFFF’;

I am also using ExColor for jQuery http://modcoder.org/ to display a killer color picker
http://modcoder.org/js/modcoder-1.1.js

The problem is that when you click to update the fields, the color picker swatches don’t get refreshed.

How can I simply reactivate or refresh the swatches when the fields are changed? What can I call in the .click function below to refresh the swatches to the new hex string, input value?

Here’s the JS:

<script type="text/javascript">

    $('document').ready(function() {

        // running ExColor
        $('#my_input_1').modcoder_excolor();
    $('#my_input_2').modcoder_excolor();
    $('#my_input_3').modcoder_excolor();
    $('#my_input_4').modcoder_excolor();
    $('#my_input_5').modcoder_excolor();
    $('#my_input_6').modcoder_excolor();
    $('#my_input_7').modcoder_excolor();
    $('#my_input_8').modcoder_excolor();
    $('#my_input_9').modcoder_excolor();
    $('#my_input_10').modcoder_excolor();
    $('#my_input_11').modcoder_excolor();
    $('#my_input_12').modcoder_excolor();
    $('#my_input_13').modcoder_excolor();
    $('#my_input_14').modcoder_excolor();
    $('#my_input_15').modcoder_excolor();    

        $('#theme01').click(function() {
            document.form1.top_menu_bgcolor.value = '#FFFFFF';
        document.form1.top_menu_bgcolor.focus();
        document.form1.top_menu_fontcolor.value = '#FFFFFF';
        document.form1.top_menu_bghovercolor.value = '#FFFFFF';
        document.form1.top_menu_fonthovercolor.value = '#FFFFFF';
        document.form1.left_menu_bgcolor.value = '#FFFFFF';
        document.form1.left_menu_fontcolor.value = '#FFFFFF';
        document.form1.left_menu_bghovercolor.value = '#FFFFFF';
        document.form1.left_menu_fonthovercolor.value = '#FFFFFF';
        document.form1.left_div_border.value = '#FFFFFF';
        document.form1.site_background_color.value = '#FFFFFF';
        document.form1.header_color.value = '#FFFFFF';
        document.form1.content_header_color.value = '#FFFFFF';
        document.form1.browser_bg_color.value = '#FFFFFF';
        document.form1.footer_color.value = '#FFFFFF';
        document.form1.footer_font_color.value = '#FFFFFF';

        });

</script>

And the HTML

<a href="#" id="theme01">Theme 1</a>


<input type="text" ID="my_input_1" name="top_menu_bgcolor" maxlength="7" value="#000000" size="10" />
  • 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-25T00:44:35+00:00Added an answer on May 25, 2026 at 12:44 am

    You can try using something similar to:

       <script type="application/javascript">
          $(document).ready(function(){
    
          $("#theme01").click(function(){
           $("#myinput1").val('#aaafFF');   
           $('#myinput1').click();
           setTimeout( function(){
                $('#c3').blur();
                $('#c3').click();
                $('#c3').blur();}, 
           50);
       return false;
          });
    
          });
     </script>
    

    where #c3 is a different div somewhere.

    This will in effect, show and hide the modcoder fast enough the user does not see it.

    Edit: Full Answer

            $("#theme01").click(function(){
                $("#myinput1").val('#aaaFFF');
                $('#myinput1').click();
                setTimeout( function(){$('#modcoder_ok').click();}, 50);
            });
    
            $("#theme02").click(function(){
                $("#myinput1").val('#222ccc');
                $('#myinput1').click();
                setTimeout( function(){$('#modcoder_ok').click();}, 50);
            });
    

    And then in html:
    Theme 1
    Theme 2

    I use two buttons, the delayed #modcode_ok.click() does a programmatically click of the ok button to select and refresh the color.
    On my computer the setTimeout at 50ms is too fast and I cannot see the popup. Maybe you need to adjust on your needs.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently using jQuery to make a div clickable and in this div I
I'm currently using this jQuery validate plugin and having an issue in IE where
I'm currently using the following jQuery plugin: jQuery OEmbed. This plugin works great in
I'm currently using jQuery and am looking for a way to slide an image
I am currently using Valums JQuery File Upload plugin. The plugin is very convenient
I'm currently using the jQuery fullcalendar plugin but I've came across an issue regarding
I'm currently using two libraries (prototype and jQuery), thus I've implemented the jQuery noConflict
I am currently using PHP/MySQL and the jQuery timeago plugin. Basically, I need to
I am currently working on a web app using Wicket and started using jQuery
I'm using the JQuery AJAX function to deliver data to a PHP doc. Currently,

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.