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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T07:03:04+00:00 2026-06-03T07:03:04+00:00

I have a form with a submit button named Apply, Visual HTML <div id=accordion>

  • 0

I have a form with a submit button named Apply,

Visual

enter image description here

HTML

<div id="accordion">
    <div>
       <h3><a href="#">Theme color and layout</a></h3>
       <div>
       <!-- Colour picker code -->
        <form id="applyColor">
           <input class='simple_color' value='#cc3333'/>     
           <input type='submit' value='Apply'/>
        </form>
        </div>
    </div>
<div>

Javascript

//Colour picker
$(document).ready(function(){
    $('.simple_color').simpleColor();

    $("#applyColor").submit(function() {
        alert($('input.simple_color')[0].value);
    });
});

Problem :

Now, Whenever I click on submit button it doesn’t execute my alert statement. I have tried to use simple alert statement like alert('Hello World!'); but it did not work as well.

I am not sure whats wrong, am I doing something wrong?


Linked Jquery

<script type="text/javascript" src="jquery-1.7.2.min.js"></script>

Sources I used to create a color picker and tutorial regarding post via ajax,

  • Color picker
  • How to post form via jquery ajax
  • 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-03T07:03:05+00:00Added an answer on June 3, 2026 at 7:03 am

    I was only able to reproduce your problem when I didn’t have the color picker properly referenced. When I did reference it, the solution worked as expected:

    $(".simple_color").simpleColor();
    
    $("#applyColor").on("submit", function(event){
        event.preventDefault();
        alert( 'Submitted' );
    });
    

    Working: http://jsbin.com/ejovir/2/edit
    Not Working (plugin not referenced): http://jsbin.com/ejovir/3/edit

    Check your console for a message similar to the following:

    Uncaught TypeError: Object [object Object] has no method ‘simpleColor’

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

Sidebar

Related Questions

I have a image button thats acts as a form submit button: <a href=#
I have a html form with no submit button. I want to submit that
I have a form with a submit button. I have called a function on
I have a form with a css submit button. When a the submit button
I have a form, with a submit button: <% form_for(@personalentry) do |f| %> <%=
I have a form in an HTM page that, after pressing the submit button,
I have a form, and want to disable/enable its submit button depending on whether
I have a form which I want to submit upon button click which is
I have a registration form. When I hit the Submit button it should check
I have... a dynamic populated select box several input boxes a submit button form

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.