Javascript Button that Jumps to the last block, not the survey end | XM Community
Skip to main content
I have a button in my footer that is displayed all the time. When it is clicked, I want it to jump to the last block in my survey (or any block I specify).



I think I do this by making the button a Jump button. FWIW: I am using a Table of Contents, so I think Jump Buttons apply.
The Jump button brings you back to the table of contents (TOC). You enable it by checking the TOC option "Show Button".



So, your button would have to set an embedded variable, then click the Jump button. A script attached to the TOC (in a message) would have to look for the embedded variable then click the link for the block you want to go to (which has to be included in the TOC).
Hi @red5



You will have to find the button id of the button on which if someone click then it should take them to the last block of the table of content.



Find out the ButtonID and FlowID (last block of TOC)



Add below code under the "header" section of "Look & Feel"



jQuery("#ButtonID").click(function()

{

jQuery("a[id='BlockID']").click();

});
@Mohammedali_Rajapakar_Ugam

That works! Thank you. Genius. My customers will be happier now.
@LaurenK

I meant for this to be a question, not a discussion. Will you please convert it so I can mark the Accepted Answer? Sorry for the noob mistake.
Hi @red5! I have gone ahead and converted this discussion to a question! Be sure to respond Yes or No to the question "Did this completely answer your question?" on each comment! 🙂

Leave a Reply