Forum Discussion
Automatically adjust size of text-box and scroll-element after changing input-text with javascript
Hi,
I´m currently working on a dictionary-function in Storyline and I want to display the user all words and their explanations on one page but in two different text-boxes. (These boxes are in a scroll-element.) The contents of each text-boxes are variables which I modify with javascript. Since the list of words is too long to show it on one page I use a scroll-element.
The Problem is:
Every list of words has a different length. When I want the text-box to automatically adjust the size, it shrinks the content to a minimum since at the beginning there is only the name of the variable in the text-box.
Since this isn´t working very well I just set the height of the boxes to 3000 so every word and its explanation is displayed well.
When I do that, I can scroll way to far in the most cases but it wont scroll back to the top of if I want to display an other list of words.
- RobertKunaCommunity Member
Does someone have a suggestion on how to scroll back to the top automatically when changing to the other characters or how to create a box with the right size?