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

JavaScript Calculator for Captivate 9

Participant ,
May 11, 2017 May 11, 2017

Hello, all.  I'm trying to use some JavaScript for a project, to allow users to interact with a simple calculator, but I'm a bit stumped.

Do I need to assign JavaScript to an object for it to display, or do I simply paste code into the Script window and 'Execute JavaScript' on stage entry?  Perhaps my code is faulty?  Does anyone have calculator code that has worked properly?

Any help will be most appreciated. 

Adam

484
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

correct answers 1 Correct answer

Community Expert , May 12, 2017 May 12, 2017

Sure, concatenation is on my wish list since many years for Captivate advanced actions, would make it so much more powerful.

Translate
Community Expert ,
May 11, 2017 May 11, 2017

Not sure if this is what you want, but I wrote two articles (planned more, but they are not popular so I didn't spend time on continuing) about using Javascript in collaboration with Advanced actions for simple calculations. Have a look at:

Playing with Numbers - part 1 - Captivate blog

Playing with Numbers - part 2 - Captivate blog

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
Participant ,
May 12, 2017 May 12, 2017

Thank you.  While this is helpful, my intent is to use concatenate to create the calculator display screen effect, all while storing numbers and executing expressions.  I'm almost there, just a little tinkering at this point.  Thanks!

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 ,
May 12, 2017 May 12, 2017
LATEST

Sure, concatenation is on my wish list since many years for Captivate advanced actions, would make it so much more powerful.

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