Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Can you trigger a image display from a text entry box with length of text?

New Here ,
Jun 23, 2015 Jun 23, 2015

I have a text entry box and learner will type in about 40 characters. Learner types in text but does not submit it. Then learner clicks a button that triggers moving to the next page.

Client wants to have an image appear after learner types text but before clicking the button.

I thought about extending the time line and displaying image on time, but I don't know how long the time line should be.  Any suggestions for another way to accomplish this?

Thanks.

322
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 23, 2015 Jun 23, 2015

How can Captivate know that the learner has finished typing if there is no action from the learner to indicate he finished, that is why clicking on the Submit button or using a shortcut key is necessary. I don't understand really what you want, maybe I misunderstand.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 23, 2015 Jun 23, 2015

I know there needs to be some kind of trigger, but was hoping for a way that might use the timeline or a variable to accomplish this.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
Jun 23, 2015 Jun 23, 2015

This can be done with HTML5 output easy enough. You attach a variable change eventlistener to the variable, when it reaches a certain length, show an image.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 23, 2015 Jun 23, 2015

David, there is not a specific length, how can you use an eventlistener in that case?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
Jun 23, 2015 Jun 23, 2015

He said about 40 characters. I don't really know how that could really be beneficial to show an image after about 40 characters. But it could be done. I guess you could actually get a random number from 35-45.

Every time the variable associated with the TEB changes, which it will with every new character, you can check it's length. When it gets to be however long, you show the image.

Sometimes I don't even try to figure out why people want to do certain things, I just try to give them a solution.

I think I would actually check the variable for a certain substring, and then show the image.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 23, 2015 Jun 23, 2015

Yes, understood that you can do it when variable has a certain length, but must have misunderstood that the length is not fixed. Moreover he is not talking about validation at all, not sure if it is a validated TEB. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
Jun 23, 2015 Jun 23, 2015

I know. It's a request of a different color. I guess I could give them some "approximated" code!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 23, 2015 Jun 23, 2015

Fine, David, thanks for all the help on this forum.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 23, 2015 Jun 23, 2015
LATEST

Why not just use a normal Text Entry box and use the ON FOCUS LOST event?

My understanding is that the client wants to have something happen between the time they leave the text box and click anything else. 

Maybe that would be good enough, AND it doesn't require any special coding.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Help resources