This simple tutorial teaches you how to get the number of characters in storyline textboxes. You can use the functionality to set limits to the short/long answers.
I have been trying to achieve something similar. It'd really be great if these fields just updated automatically, or if, at the very least, you could access the Element ID of the text input fields so you can make the Javascript easier.
Chris Hodgson (as usual) does some pretty incredible stuff in this video. One of the things he does, however, is use jQuery to constantly monitor how many characters the user is typing.
Unfortunately, it takes getting into the published code and adding a single line of code to allow the course to access the jQuery library. It's also still a bit over my head in terms of what Chris is doing. So, trying to reverse-engineer his code to do what I need it to do, but I'll get there I'm sure.
6 Replies
Thanks for sharing this, Sumit. Perhaps, you could give the Javascript code as a download. This way there would be no need to type it all over again.
Thank you for this!
Is there a way to have the count variable automatically +1 as the user types? So the count variable adjusts in real time?
That's what I need to achieve, Amanda! Please do share if you've found a way to do it.
I'm also hoping to find a code for word count instead of character count.
I have been trying to achieve something similar. It'd really be great if these fields just updated automatically, or if, at the very least, you could access the Element ID of the text input fields so you can make the Javascript easier.
Chris Hodgson (as usual) does some pretty incredible stuff in this video. One of the things he does, however, is use jQuery to constantly monitor how many characters the user is typing.
Unfortunately, it takes getting into the published code and adding a single line of code to allow the course to access the jQuery library. It's also still a bit over my head in terms of what Chris is doing. So, trying to reverse-engineer his code to do what I need it to do, but I'll get there I'm sure.
Anyway, I hope this helps you all!
His video is here!