Skip to main content
Participant
January 28, 2025
Question

Copying Value of Text Caption Using JS

  • January 28, 2025
  • 2 replies
  • 257 views

I have a text caption that has two states defined each with different text value. I need to copy the value of Text Caption on Click of a button. KIndly help if you know a way to do it.

2 replies

OH_CP_Lover_&_Hacker
Inspiring
January 29, 2025

I know when people have to ask you why....but I was curious as to why you are seeking, or needing , to use JS to copy text values in caption objects?  What is the reason process for your need?  I ask this, just incase there might be somthing better, or different to do for your project.  Hope you are having a great day!

Participant
January 29, 2025

I have two buttons that display different states of single Text Caption element. The content of TextCaption is code snippet that I want learner to be able to copy the code snippet for lab execution so that they do not have to write is line by line. 

OH_CP_Lover_&_Hacker
Inspiring
January 29, 2025

I might be able to help, first I'd need to what version of Captivate are you using to make your project?  Captivate Classic or New Version of Captivate?

Participant
January 29, 2025

It is captivate classic (Version 11.8.3)

OH_CP_Lover_&_Hacker
Inspiring
January 31, 2025

Sent you a private message.   Talk with you soon!