Skip to main content
Inspiring
October 16, 2017
Answered

CP9 - Is it possible to Show/Hide a Web Object using external Javascript?

  • October 16, 2017
  • 1 reply
  • 1431 views

CP 9 v9.0.2.437

HTML5 only

Hello,

I am using a Web Object named 'woMain' which has onclick buttons in it to either show or hide other Smart Shapes or Web Objects on the same Captivate slide.

The buttons will show/hide a smart shape, but they will not show/hide another web object on the page.

My Question:

Is it possible to Show/Hide a Web Object using external Javascript?

Thank you

Peter

=======================================

A bit more info:

I have updated my AdobeCaptiavte.ini to read UseWidget7 = 1

This is the code inside my onclick buttons in Web Object called 'woMain'.

function myFunctionShow() {

window.parent.cp.show("ssFlag");  <- This works for a Smart Shape.

window.parent.cp.show("woTable"); <- This does not work for a Web Object.

}

function myFunctionHide() {

window.parent.cp.hide("ssFlag"); <- This works for a Smart Shape.

window.parent.cp.hide("woTable"); <- This does not work for a Web Object.

}

    This topic has been closed for replies.
    Correct answer ankits61431843

    Hi, I have tested your scenario and it is working absolutely fine for me. Could you test the module with the default value of UseWidget (as it was previously) as I am not sure about this.

    1 reply

    ankits61431843
    Inspiring
    October 16, 2017

    Could you please provide some screenshot of source file to understand clearly.

    Inspiring
    October 16, 2017

    This is a screenshot of the page with the woMain.

    The buttons for Show and Hide are buttons in the HTML document in woMain, so they are external to Captivate, (and they have to be external, they cannot be put on the slide).

    This second screenshot shows what should happen, both the ssFlag and the woTable that were hidden should now be visible.

    However, only the ssFlag becomes visible, the woTable remains hidden.

    Peter

    ankits61431843
    ankits61431843Correct answer
    Inspiring
    October 16, 2017

    Hi, I have tested your scenario and it is working absolutely fine for me. Could you test the module with the default value of UseWidget (as it was previously) as I am not sure about this.