Skip to main content
RoseLee
Participating Frequently
February 18, 2016
Answered

Not able to copy&paste in javascript window

  • February 18, 2016
  • 3 replies
  • 579 views

Hello everyone,

I have captivate 8.0.0.145 and I'm creating an advanced action that executes a javascript.

I have my code in Notepad++ and I want to copy and paste the code written in Notepad++ to the javascript window but no matter what I do, when I hit the ok button my code dissapears.


Anyone have the same issue?

Thanks in advance.

Rosalie

This topic has been closed for replies.
Correct answer Lilybiri

Bit Off topic, but please install the patch to upgrade to 8.0.1, you still use the first release (several bugs).

For JS: this could be the reason, cannot you insert the code (create functions) in the JS file and call the function from the JS command in the advanced action?

3 replies

RoseLee
RoseLeeAuthor
Participating Frequently
February 19, 2016

Hi,

Thanks for your help  @RodWard @Lilybiri @TLCMediaDesign

@Lilybiri I wasn't ignoring you it was a bit late for me and my brain wasn't working properly at that time.

As you suggested, the problem is with the length of my code so I will go with the other workflow, I've tested and the code works as expected.

Rosalie

TLCMediaDesign
Inspiring
February 18, 2016

In my experience that happens when Captivate doesn't like characters in your script. You cannot use for loops and some other things.

You can put it in the other window as you described, but it won't execute.

Lilybiri
Legend
February 18, 2016

Thanks, David, glad you popped in because you can explain much better the limitations of the JS window in Captivate.

TLCMediaDesign
Inspiring
February 18, 2016

And because of those limitations, and the text is just too small to read at my age, I only use it to call external functions.

The best part is that you don't have to republish to edit your code.

RodWard
Community Expert
Community Expert
February 18, 2016

Try copying your code to Notepad (not the ++ version) and then try copy/paste.  It works for me.  Perhaps Notepad ++ is not compatible.

RoseLee
RoseLeeAuthor
Participating Frequently
February 18, 2016

Thanks for your reply Rod.

I copied the code in notepad and in sublime and I get the same result.

Is it possible that there's a limit of the amount of code?

Rosalie

Lilybiri
LilybiriCorrect answer
Legend
February 18, 2016

Bit Off topic, but please install the patch to upgrade to 8.0.1, you still use the first release (several bugs).

For JS: this could be the reason, cannot you insert the code (create functions) in the JS file and call the function from the JS command in the advanced action?