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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T16:54:50+00:00 2026-05-22T16:54:50+00:00

I am using jquery’s change() method in my code. $(select,input,textarea).change(function () { needToConfirm =

  • 0

I am using jquery’s change() method in my code.

 $("select,input,textarea").change(function ()
    {
        needToConfirm = true;
        alert("needToConfirm :" + needToConfirm); 
    })  

It’s working fine with all select, input as well as textarea element except for following textarea element

<textarea name="myTextArea" id="myTextArea" class="mceEditor" rows="4" cols="125">${myForm.someAttribute }</textarea>

I observed that other textarea don’t have any dynamic value while this myTextArea have ${myForm.someAttribute} value. This seems to be the cause but I am not able to figure out the exact reason.

Its working fine with following textarea element

<textarea path="studySummary" cssClass="fieldValue mediumFontSize" rows="4" cols="95" tabindex="67"/>

EDIT:
Hello All,
All things are working fine but I came across a new issue. I have some HTML elements like select,input etc which get added dynamically through javascript. How can I bind jquery’s change() method to this dynamically added elements ? Right now change() is only invoked for static elements.
EDIT2
Got the solution. Copy of this question.

  • 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-22T16:54:51+00:00Added an answer on May 22, 2026 at 4:54 pm

    I am assuming from the class="mceEditor" that you are using the tinyMCE editor.

    This will replace the actual element, and so your code will not run on the new element.

    Here is the proposed way on handling such a case http://tinymce.moxiecode.com/wiki.php/Configuration:onchange_callback


    You basically have to put your change code in a function, and use that when initializing the tinyMCE.

     function handleChange() {
            needToConfirm = true;
            alert("needToConfirm :" + needToConfirm); 
        }
    
     $("select,input,textarea").change(handleChange);
    

    and also when you call the tinyMCE initialization add the

    tinyMCE.init({
            ...
            onchange_callback : handleChange //<-- ADD THIS PART
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

using jQuery I have the following code: var selectedIdsArray = $(#selectId option:selected).map(function(){return this.value;}); var
Using jQuery , how can I dynamically set the size attribute of a select
Using jQuery, is there a way to select all tag that reference a specific
Using jQuery what provides for faster object construction: With the HTML code $('<dd class=foo
Using jQuery, what is the most simple and elegant way to re-select an item
Using jQuery, I need to select all elements that do not have a background
Using jQuery 1.7.2 $(function(){ $('#parentElem').mouseenter(function(){ $('.myElem').animate({opacity:1}, 'fast'); }).mouseleave(function(){ $('.myElem').stop().animate{opacity:0}, 'slow'); }); }); In this
Using jQuery 1.5.1 Tried this block of code in: head section as well as
Using jQuery and using the ajax function, what causes it to use the error
Using jQuery and the jQuery URL plugin. I have the following code: $('#secondary-nav >

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.