Skip to main content
Participant
June 14, 2007
Question

Clear text entry values

  • June 14, 2007
  • 6 replies
  • 1110 views
Hi,

I have a simple file that requires the user to enter specific values in text boxes. If they are not able to work through the activity succesfully, they see a "Try Again" Button. I originally had the action of that button set to go back to slide #1. I noticed that the values entered in the text boxes on the first attempt were there when each slide loads. I then tried setting the action to javascript - window.location.reload() which reloads the page, but the values are still there.

How can I offer a second attempt that will clear the values in the text entry boxes.

Thanking you in advance!
    This topic is closed to new replies. Start a new post to keep the conversation going.

    6 replies

    Nandhakumar S
    Participating Frequently
    February 17, 2017

    Hi,

    you add custom Clear button and  write javascript code

    Clear-button

    var elem = document.getElementById("Text_Entry_Box_1_inputField");

    elem.value = "";

    Lilybiri
    Legend
    June 4, 2018

    This is a very OLD thread, more than 10 years. Lot has changed since CP3 in Captivate. If you want to clear the value of the TEB variables there are easier ways than with JS. But the changes to the variable do not appear immediately in the TEB. That can be solved in  different ways as well. Here are some ideas:

    Where is Null in CP2017? - Captivate blog

    I will lock the thread to avoid confusion.

    Participant
    June 14, 2007
    I am actaully reloading the container page (using the javascript window.location.reload()) not linking to the first slide of the Captivate file. I have also tried linking to the url of the page, but the values remain.

    I will definitely fill out a request... it isn't logical that scorable objects cannot be reset.
    Participant
    June 14, 2007
    Hmmm... I don't actually have quizzing enabled. I know that the text box won't function properly unless its options are marked to "Include in Quiz," but I have not enabled scoring using the quiz manager. I'll try using the URL directly, but not sure why reloading the page would not work.
    Captiv8r
    Legend
    June 14, 2007
    Hi again

    When you say: ...but not sure why reloading the page would not work. I'm taking that to mean that you are creating a link from one slide back to the original slide where the Text Entry box is placed.

    You have to understand that even though you don't have any scoring features enabled, a Text Entry box is still a scorable object that might be used for testing. There isn't an option to cause the field to be reset. At least not at this point. Who knows what the future may hold if enough folks ask for this ability.

    Cheers... Rick
    Captiv8r
    Legend
    June 14, 2007
    Hi CallRicker

    As you have seen, Captivate doesn't do this. The only surefire way I'm aware of to clear it all out is to totally restart the project. So assuming your quizzing part begins at slide one, just point at the URL used to launch the project. Things will start fresh and off you go.

    If you feel resetting things would be a nice feature to have available (I do see more than a few posts asking about it) please consider submitting a Wish Form. You may do this by clicking here.

    Cheers... Rick