Next button hidden but flashes on page transition | XM Community
Solved

Next button hidden but flashes on page transition

  • 23 January 2019
  • 6 replies
  • 38 views

Userlevel 1
How can I avoid that a hidden next button still briefly flashes when a page transition occurs?

The Problem
!

On a different note: another problem is that the layout of the whole page changes for a millisecond when clicking the button... this is really weird.

To hide the next button, I use the code to hide the next button recommended here:

Qualtrics.SurveyEngine.addOnReady(function()
{
$('NextButton').hide();
}

I think this must be a standard problem, but could not find a solution here or on google (any hints welcome). Thanks a lot!
icon

Best answer by JanaJarecki 23 January 2019, 21:26

View original

6 replies

Userlevel 6
Badge +18
Hi @JanaJarecki ,

Add following code in JS in OnReady Function:
` jQuery("#NextButton").hide();
jQuery("#tempHead").hide();`

Add following code in HTML view of your question:
` <div id="tempHead" style="height:1500px"></div>`

You can refer this answer by @TomG
Userlevel 1
Thank you,
I tried, but this solution does not work.

I am curious: can you detail a bit more on the background functionality? Thank you for this.

What worked is to set the button's style via the change question text in raw HTML functionality:

<style>
#NextButton {
visibility: hidden;
}
</style>
Userlevel 6
Badge +18
Hi @JanaJarecki ,

JavaScript takes little time to load the script when new page is displayed.
Due to this delay you were seeing the Next Button for say second or so. 😀
Userlevel 1
@SaurabhPujare_Ugam I know, I wanted to know about the solution you posted and how it is suppose to work 😃
Userlevel 6
Badge +18
Hi @JanaJarecki ,

Oh.. 😃

I added empty `<div>` with extra height in header and hide this with JS. So that it would have the effect of pushing all the page content off the bottom of the screen until the script completed.

Next button hidden but flashes on page transitionAll I can say is that you S.A.V.E.D. me. Looked through every hide next button post. One experiment wouldn't have a flashing problem; another one would.

Leave a Reply