Copy link to clipboard
Copied
I suppose this is still not an automatic feature, but is there a workaround that is supported by HTML5 output? I tried dropping a Rollover Area over the Submit button area. The hand cursor appears but the Submit button no longer works. All works fine in SWF but I need it to work in HTML5 only.
Thanks.
Copy link to clipboard
Copied
You can use this JavaScript:
document.getElementById('Text_Entry_Button_1').style.cursor = 'pointer';
This is for a TEB named "Text_Entry_Box_1", substitute Button for Box.
Copy link to clipboard
Copied
Thanks - I will give it a try - do I attached this script to the "On Enter" Action of the slide?
Copy link to clipboard
Copied
Should work, I have in the onSlideEnter listener of an external js file.
Copy link to clipboard
Copied
Not working when I publish to HTML5 only. This does work when I do a Preview "From this slide".
Copy link to clipboard
Copied
What is the name of your TEB? It worked for me from the JS window.
Copy link to clipboard
Copied
The Text Entry Box is named Text_Entry_Box_4.
I put Text_Entry_Button_4 in the JS code.
Copy link to clipboard
Copied
I see, I changed the name to Text_Entry_Box_4 but the button is still Text_Entry_Button_1.
What is the name of the associated variable for the TEB?
Copy link to clipboard
Copied
How are you getting the name of the button?
Copy link to clipboard
Copied
It's in the CPM.js, just trying to find a correlation to the TEB and the button, maybe through the variable associated with the TEB.
Copy link to clipboard
Copied
Yes, there should be unique identifier for that button. Where do I find an associated variable for the TEB - I did not assign one.
Copy link to clipboard
Copied
I think it is possible to dynamically determine what name Captivate assigned to the button. Maybe I'll have a script in the morning.
Copy link to clipboard
Copied
This seems to work, put the name of the TEB where the bolded text is.
document.getElementById( getButton( 'Text_Entry_Box_2' ) ).style.cursor = 'pointer';
function getButton( which )
{
var res = cp.model.data.project_main.slides.split( ',' );
var cSlide = res[ window.cpInfoCurrentSlide - 1 ];
var thisSlide = cp.model.data[ cSlide ];
for ( var i = 0; i < thisSlide.si.length; i++ )
{
if ( cp.model.data[ thisSlide.si[ i ].n ].mdi == which + 'c' )
{
myButton = cp.model.data[ thisSlide.si[ i + 1 ].n ].mdi;
break;
}
}
return myButton.substring( 0, myButton.length - 1 );
}
Copy link to clipboard
Copied
This still doesn't work when I put the script in the On Enter Slide Execute JavaScript window.
Copy link to clipboard
Copied
Out of ideas then. Unless you look in the CPM.js and see what the button name is and use the first method.
Copy link to clipboard
Copied
The script may not be working because of the for loop in the js window. It may need to be moved to an external file.
Copy link to clipboard
Copied
OK - not done this yet in Captivate. Where/how do I make the call from Captivate out to the .js file?
Copy link to clipboard
Copied
You would put the function in the head of the html file or include an external js file
function getButton( which )
{
var res = cp.model.data.project_main.slides.split( ',' );
var cSlide = res[ window.cpInfoCurrentSlide - 1 ];
var thisSlide = cp.model.data[ cSlide ];
for ( var i = 0; i < thisSlide.si.length; i++ )
{
if ( cp.model.data[ thisSlide.si[ i ].n ].mdi == which + 'c' )
{
myButton = cp.model.data[ thisSlide.si[ i + 1 ].n ].mdi;
break;
}
}
return myButton.substring( 0, myButton.length - 1 );
}
Then put this in the js window:
document.getElementById( getButton( 'Text_Entry_Box_2' ) ).style.cursor = 'pointer';
It's worked in all of the test I did, even with several TEBs on a slide.
Copy link to clipboard
Copied
Not working like I want it to but something is happening. When I click on the Submit button with the WRONG text in the TEB, I get the hand cursor! It also happens with the CORRECT text, but the slide advances, so it happens very quickly.
In short, the hand cursor doesn't show up until I click on the Text Entry Button.
Copy link to clipboard
Copied
Slide will only advance if the Actions for the TEB have 'Continue' in it. How did you set up those actions?
Copy link to clipboard
Copied
The TEB "On Success" Action is set to "Go to the next slide". It works fine.
What I am trying to accomplish is to have the cursor change to a hand when it hovers over the TEB's Submit button.
Copy link to clipboard
Copied
They are named as they are created, so if that is the first TEB in the project it will be Text_Entry_Button_1
Copy link to clipboard
Copied
There is an option to add a hand cursor for different smart shapes. If you go into the smart shape then you look at the properties of it. Look at the Actions. Next go to the others title. Under that there are 3 options: Hand cursor (what you want), Double Click, Disable Click Sound. That might be a possible solution for what you are trying to achieve.
Copy link to clipboard
Copied
MichH
The problem with the Submit button in a Text Entry Box is that there is no Actions button, if there were this would be simple.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now