Forum Discussion
MichaelHalbrein
7 years agoQrew Cadet
having trouble getting image uploaded. to try to describe the scenario ... on tab 1, the button sits at the bottom of the form from the beginning (e.g. it is always shown). The user answers multiple questions on the form. The last MC question (Yes or No) sits just above the button. If the user selects yes, the 2nd tab shows up (the 2nd tab is otherwise hidden). The 2nd tab is hidden from the start and only shows when Yes is selected to that question. If the user selects No then it remains hidden. In this latter scenario, the button, when clicked, should go to the 3rd tab that is always shown. I hope this helps?!
AlexWilkinson
7 years agoQrew Assistant Captain
Modifying just the first line of the script seems to solve the problem. Here's the full script:
var nextTabLink=$("li.ui-tabs-selected").nextAll(":visible").children("a:first");
$("#saveAndKeepWorkingMenuOption").click();
var noErrorDialog=$('#qbDialog').length==0;
if( noErrorDialog ){
$(nextTabLink).click();
location.assign("#mainBodyDiv");
};
var nextTabLink=$("li.ui-tabs-selected").nextAll(":visible").children("a:first");
$("#saveAndKeepWorkingMenuOption").click();
var noErrorDialog=$('#qbDialog').length==0;
if( noErrorDialog ){
$(nextTabLink).click();
location.assign("#mainBodyDiv");
};