0

I have a list (MyList) with some columns. It also contains a column (Mydesc) which is a multiline text box having enhanced rich text. Now in the edit form I have to check whether any change occurs in the form. For every other column I can capture the change event but not for my "Mydesc" column. I tried this code but failing.

    $("#Mydesc_aede8400-1a1f-4071-b97a-188d2980b7b1_$TextField").keydown(function() {
alert('Testing...');
});

Error message is:

Syntax error, unrecognized expression: #Mydesc_aede8400-1a1f-4071-b97a-188d2980b7b1_$TextField

0

Your selector has a special character $ and it must be escaped with

two backslashes: \\

To use any of the meta-characters ( such as  !"#$%&'()*+,./:;<=>?@[\]^`{|}~ ) as a literal part of a name, it must be escaped with with two backslashes: \\. For example, an element with id="foo.bar", can use the selector $("#foo\\.bar"). 

https://api.jquery.com/category/selectors/

  • Also tried to fetch the ID using this statement – yash Oct 21 '16 at 10:07
  • $("textarea[Title='MyDesc']").closest("span").find("iframe[Title='Rich Text Editor']") – yash Oct 21 '16 at 10:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.