When $write references a <textarea> element, everything works as expected, however when you change the <textarea> element to in <input> element, the script fails, as an <input> element doesn't have a .html() method.

Change the above line to this and things will work as expected:

$write.val($write.val() + character);

Hope that helps.

botpro7
—
2013-04-13T13:02:04Z —
#3

Hi Pullo, thanks for your help. It works.

As you said that "an <input> element doesn't have a .html() method", do you know where can i find the best reference of this?Thanks again

Pullo
—
2013-04-13T13:13:19Z —
#4

Hi there,

botpro7 said:

As you said that "an <input> element doesn't have a .html() method", do you know where can i find the best reference of this?