+ 3

My "next button" isn't working.

I have a button that is supposed to go to diffetent text when it is pushed but it's not working. I used the same JavaScript as I did for another project and it worked so I don't know why it won't won't work for this one. When I press it the heading for the other divs for my "web vulnerabilities" section are supposed to pop up. https://code.sololearn.com/WPMNdUMnUJ0y/?ref=app

10th Apr 2018, 3:23 PM
Babydoll Scripts
Babydoll Scripts - avatar
6 Antworten
+ 4
Ok may bad. I thought you meant the next button thingy
10th Apr 2018, 4:15 PM
Toni Isotalo
Toni Isotalo - avatar
+ 4
Okay. Works for me :/ next.onclick=function(){ var previousSection=currentSection; if(currentSection < sections.length + 1) ++currentSection; if(currentSection == sections.length){ currentSection=0; } sections[currentSection].style.display="block"; sections[previousSection].style.display="none"; }
10th Apr 2018, 4:19 PM
Toni Isotalo
Toni Isotalo - avatar
+ 2
Toni Isotalo I still have that sane error.
10th Apr 2018, 4:11 PM
Babydoll Scripts
Babydoll Scripts - avatar
+ 2
*same
10th Apr 2018, 4:12 PM
Babydoll Scripts
Babydoll Scripts - avatar
+ 2
I do mean the next button. It's still not working after I fixed my errors.
10th Apr 2018, 4:17 PM
Babydoll Scripts
Babydoll Scripts - avatar
+ 2
Toni Isotalo Will you check my code to make sure I did it right?
10th Apr 2018, 4:22 PM
Babydoll Scripts
Babydoll Scripts - avatar