I’m teaching myself programming whilst builodng a website.
I am struggling with a multistep progress bar. There are 4 steps but the progress bar completes in 3 when I click the previous of next button.
I’ve adapted the code for my webiste but I can’t find where the progress bar length is determined. I’ve looked at changing it to 25% in JS but there is no indicatin of the bar length that I can find.
It looks like the Js code could be missing a step in the html code but I can’t find that either.
Step1 is OK but the problem starts with step 2. It seems to progress 40%.
There are, in fact, 5 steps in your 4 stage operation:
Start
After Step 1
After Step 2
After Step 3
Done.
This is referred to as a Fencepost Problem. (“I have 4 panels of fencing to put up… but i actually need to space out 5 posts, because the ends both have to be covered…”)
NOTE: I am assuming that “confirmation” is a step, and not the finished screen. If it is the finish screen, you’ve got some extra work to do on the bar; if it’s not, you should add an extra step for the finish screen.
I’ve tried allsorts to sort this problem out like adding an extra div with jus
, changing the numbers etc but they didn’t work.
What I have decided to do is this, change the 1 to 0 (4-0) * 100 + 25%.
The confirmation stage doesn’t complete but for me it doesn’t matter. The reason being that it is something that the system will do and not the customer.
I have changed the message to let the customer know that they will get a confirmation.
I’m not certain that it’s the right approach.
It looks like I need to change the count from 5 to 4 but I don’t know how to do that.
How can I remove confirmation from the side bar and get the progress bar to end at checkout?
It’s a bit difficult for me to see what you have done on the small screen. I’ve C+P the files into notepad so that I can print and compare them.That way, I will learn.
I did create a set of bars, one for for each URL but I thought that it would be easier to use one!