Highlighted

Java script to hide figure and jump to specific slide

New Here ,
Nov 02, 2018

Copy link to clipboard

Copied

Hey everyone!

I have a mind map, with approximately 20 options (little squares). I would like to create an interactive file, where I can click on each option (square) and open a slide with a fact sheet for this option. Then, in each fact sheet, I would like to have two buttons: a yes and no. If yes, then I should be redirected to the initial mind map with no alterations. If no, then I am redirected to the initial map, but the map no longer has the square that I clicked in. This means that I would like to hide the figure (which is in another slide) and be redirected to this slide, where the figure no longer is available. The process would restart and continue until all the little squares were evaluated.

To do so, I thought that I could do a button with the option to execute a JavaScript. In this script, I would like to have to the options to jump to a certain slide and hide the figure X - and keep it hidden for the rest of my presentation. The goal is that the user can assess all the 20 options, by reading their fact sheets, and deciding if they should be kept in the mind map. In this sense, each person would be able to develop their individual mind map.

Does anybody know if this is possible and how could I write this code?

I am not very familiar with programming and this is was the 'best' option I found so far. I am also open to new ideas

Thank you!

Adobe Community Professional
Correct answer by TLCMediaDesign | Adobe Community Professional

You don't really need JavaScript for this. JS would work if you named everything correctly and you could make the code dynamic so all slides used the same code.

For example, if the square you click on was named "map_1_cb" and the slide you jump to for the description was name "map_1", you could execute:

cp.hide(window.cpInfoCurrentSlideLabel+"_cb");

window.cpCmndGotoSlide = 1; //slide number - 1

window.cpCmndResume = 1;

Or you could just create an action:

On the no button, just hide the square and jump back to the slide in a shared action.

Views

160

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Java script to hide figure and jump to specific slide

New Here ,
Nov 02, 2018

Copy link to clipboard

Copied

Hey everyone!

I have a mind map, with approximately 20 options (little squares). I would like to create an interactive file, where I can click on each option (square) and open a slide with a fact sheet for this option. Then, in each fact sheet, I would like to have two buttons: a yes and no. If yes, then I should be redirected to the initial mind map with no alterations. If no, then I am redirected to the initial map, but the map no longer has the square that I clicked in. This means that I would like to hide the figure (which is in another slide) and be redirected to this slide, where the figure no longer is available. The process would restart and continue until all the little squares were evaluated.

To do so, I thought that I could do a button with the option to execute a JavaScript. In this script, I would like to have to the options to jump to a certain slide and hide the figure X - and keep it hidden for the rest of my presentation. The goal is that the user can assess all the 20 options, by reading their fact sheets, and deciding if they should be kept in the mind map. In this sense, each person would be able to develop their individual mind map.

Does anybody know if this is possible and how could I write this code?

I am not very familiar with programming and this is was the 'best' option I found so far. I am also open to new ideas

Thank you!

Adobe Community Professional
Correct answer by TLCMediaDesign | Adobe Community Professional

You don't really need JavaScript for this. JS would work if you named everything correctly and you could make the code dynamic so all slides used the same code.

For example, if the square you click on was named "map_1_cb" and the slide you jump to for the description was name "map_1", you could execute:

cp.hide(window.cpInfoCurrentSlideLabel+"_cb");

window.cpCmndGotoSlide = 1; //slide number - 1

window.cpCmndResume = 1;

Or you could just create an action:

On the no button, just hide the square and jump back to the slide in a shared action.

Views

161

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Nov 02, 2018 0
Adobe Community Professional ,
Nov 02, 2018

Copy link to clipboard

Copied

You don't really need JavaScript for this. JS would work if you named everything correctly and you could make the code dynamic so all slides used the same code.

For example, if the square you click on was named "map_1_cb" and the slide you jump to for the description was name "map_1", you could execute:

cp.hide(window.cpInfoCurrentSlideLabel+"_cb");

window.cpCmndGotoSlide = 1; //slide number - 1

window.cpCmndResume = 1;

Or you could just create an action:

On the no button, just hide the square and jump back to the slide in a shared action.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 02, 2018 1
Most Valuable Participant ,
Nov 02, 2018

Copy link to clipboard

Copied

Why not use a shared action?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 02, 2018 0
Adobe Community Professional ,
Nov 02, 2018

Copy link to clipboard

Copied

Agree Lieve, that's what I said in the last 2 lines of my post.

The JS would only be beneficial if it was running in the background in an external file and listening for button clicks.

If not, you would need to execute JS just as many times as a shared action.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 02, 2018 0
Most Valuable Participant ,
Nov 02, 2018

Copy link to clipboard

Copied

Sorry, David, I was just answering by mail on my phone, didn't see your answer. Sometimes I wonder why people like to make it complicated when there are simple solutions.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 02, 2018 0
Adobe Community Professional ,
Nov 02, 2018

Copy link to clipboard

Copied

Not a problem Lieve. I agree.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 02, 2018 0
New Here ,
Nov 12, 2018

Copy link to clipboard

Copied

Hi! Sorry for my late response! The shared action worked perfectly and indeed was much easier. Thank you very much for the help.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 12, 2018 0
Lilybiri LATEST
Most Valuable Participant ,
Nov 12, 2018

Copy link to clipboard

Copied

Of ccourse shared actions are much more powerful than mot think. Have a look at:

Challenges for Starters - Captivate blog

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 12, 2018 0