botpro7 — 2013-04-13T04:34:47-04:00 — #1
Hi guys, i've been trying to customizing this virtual keyboard but have no clue what is wrong.
If i change
<textarea id="write" type="password" rows="1" cols="30"></textarea>
<input id="write" type="password"/> the virtual keyboard isn't working.
Could anyone please help me how to solve this? Thanks in advanced.
Please check this out
pullo — 2013-04-13T08:02:20-04:00 — #2
This is the line responsible for updating the output:
$write.html($write.html() + character);
$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
Change the above line to this and things will work as expected:
$write.val($write.val() + character);
Hope that helps.
botpro7 — 2013-04-13T09:02:04-04:00 — #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?
pullo — 2013-04-13T09:13:19-04:00 — #4
A good place to look is the jQuery API documentation.
In this particular case, looking at the docs for
[.html()](http://api.jquery.com/html/) might be a good place to start.
botpro7 — 2013-04-16T03:31:54-04:00 — #5
ok thanks, might need a longer time to get the whole picture...