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

Text Entry Submit button hand cursor

Explorer ,
Mar 30, 2016 Mar 30, 2016

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.

1.0K
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
People's Champ ,
Mar 30, 2016 Mar 30, 2016

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.

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
Explorer ,
Mar 30, 2016 Mar 30, 2016

Thanks - I will give it a try - do I attached this script to the "On Enter" Action of the slide?

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
People's Champ ,
Mar 30, 2016 Mar 30, 2016

Should work, I have in the onSlideEnter listener of an external js file.

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
Explorer ,
Mar 30, 2016 Mar 30, 2016

Not working when I publish to HTML5 only. This does work when I do a Preview "From this slide".

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
People's Champ ,
Mar 30, 2016 Mar 30, 2016

What is the name of your TEB? It worked for me from the JS window.

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
Explorer ,
Mar 30, 2016 Mar 30, 2016

The Text Entry Box is named Text_Entry_Box_4.


I put Text_Entry_Button_4 in the JS code.

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
People's Champ ,
Mar 30, 2016 Mar 30, 2016

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?

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
Explorer ,
Mar 30, 2016 Mar 30, 2016

How are you getting the name of the button?

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
People's Champ ,
Mar 30, 2016 Mar 30, 2016

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.

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
Explorer ,
Mar 30, 2016 Mar 30, 2016

Yes, there should be unique identifier for that button. Where do I find an associated variable for the TEB - I did not assign one.

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
People's Champ ,
Mar 30, 2016 Mar 30, 2016

I think it is possible to dynamically determine what name Captivate assigned to the button. Maybe I'll have a script in the morning.

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
People's Champ ,
Mar 30, 2016 Mar 30, 2016

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 );
}

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
Explorer ,
Mar 31, 2016 Mar 31, 2016

This still doesn't work when I put the script in the On Enter Slide Execute JavaScript window.

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
People's Champ ,
Mar 31, 2016 Mar 31, 2016

Out of ideas then. Unless you look in the CPM.js and see what the button name is and use the first method.

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
People's Champ ,
Apr 01, 2016 Apr 01, 2016

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.

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
Explorer ,
Apr 01, 2016 Apr 01, 2016

OK - not done this yet in Captivate. Where/how do I make the call from Captivate out to the .js file?

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
People's Champ ,
Apr 01, 2016 Apr 01, 2016

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.

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
Explorer ,
Apr 01, 2016 Apr 01, 2016

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.

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
LEGEND ,
Apr 01, 2016 Apr 01, 2016

Slide will only advance if the Actions for the TEB have 'Continue' in it. How did you set up those actions?

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
Explorer ,
Apr 01, 2016 Apr 01, 2016
LATEST

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.

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
People's Champ ,
Mar 30, 2016 Mar 30, 2016

They are named as they are created, so if that is the first TEB in the project it will be Text_Entry_Button_1

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
Guest
Mar 31, 2016 Mar 31, 2016

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.

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
Explorer ,
Apr 01, 2016 Apr 01, 2016

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.

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