+ 4

My "next" button isn't working.

I have a next button and it won't work. It's supposed to go to the next peice of text in the array like SQL,XSS,etc. And it's not working. At first it kept saying that next is not a function. But it is! It was literally set as a function. https://code.sololearn.com/WEGux55poT9k/?ref=app

13th Apr 2018, 7:23 PM
Babydoll Scripts
Babydoll Scripts - avatar
31 Answers
+ 2
Roel Yes. It's only about the next button. I just want it to go to the next bit of text.
13th Apr 2018, 7:56 PM
Babydoll Scripts
Babydoll Scripts - avatar
+ 2
Roel The code takes the value of currentSection and passes it on the previous section. Then it says to let Current section number increase everytime it is pressed and if it gets bigger than sections.length then it returns to 0.
13th Apr 2018, 7:58 PM
Babydoll Scripts
Babydoll Scripts - avatar
+ 2
About me is not the text I want the next button to interact with. It's an entirely different page. I would want it to only interact with the it's that have a section assigned to it.
13th Apr 2018, 8:01 PM
Babydoll Scripts
Babydoll Scripts - avatar
+ 2
Roel Its okay. I'm just glad you're trying to help.
13th Apr 2018, 8:03 PM
Babydoll Scripts
Babydoll Scripts - avatar
+ 2
I want to see the content for SQL, after that Xss, and Broken authentication.
13th Apr 2018, 8:05 PM
Babydoll Scripts
Babydoll Scripts - avatar
+ 2
Roel And in the order of the sections. If next is clicked 1 time then it goes to section 1 which is equal to SQL. The 2nd time it should go to section 2 which is Xss. And so on...
13th Apr 2018, 8:07 PM
Babydoll Scripts
Babydoll Scripts - avatar
+ 2
You want me to put it in that order?
13th Apr 2018, 8:09 PM
Babydoll Scripts
Babydoll Scripts - avatar
+ 2
I wonder why... I'll give it a shot
13th Apr 2018, 8:10 PM
Babydoll Scripts
Babydoll Scripts - avatar
+ 2
Roel You think it was just in the wrong order?
13th Apr 2018, 8:10 PM
Babydoll Scripts
Babydoll Scripts - avatar
+ 2
Not working for me. Mind if I see how you customized it? I don't get it because I wrote the elements in html in the order the sections originally were.
13th Apr 2018, 8:13 PM
Babydoll Scripts
Babydoll Scripts - avatar
+ 2
Roel My phone
13th Apr 2018, 8:16 PM
Babydoll Scripts
Babydoll Scripts - avatar
+ 2
Roel Perhaps I should try on PC.
13th Apr 2018, 8:18 PM
Babydoll Scripts
Babydoll Scripts - avatar
+ 2
Roel You are right. It is working. I wonder why my phone can't do the same.
13th Apr 2018, 8:21 PM
Babydoll Scripts
Babydoll Scripts - avatar
+ 2
Roel I'm with android too. Maybe I should reboot the app.
13th Apr 2018, 8:25 PM
Babydoll Scripts
Babydoll Scripts - avatar
+ 2
Thanks, you're awesome.
13th Apr 2018, 8:26 PM
Babydoll Scripts
Babydoll Scripts - avatar
0
is it only about your "next" button? because it also says that "button()" isn't defined
13th Apr 2018, 7:54 PM
Roel
Roel - avatar
0
oh and maybe it's because your "next" button doesn't do anything by "onclick" so i don't really know the function of it but maybe I'm just a noob
13th Apr 2018, 7:56 PM
Roel
Roel - avatar
0
I think it was because the "h2" element didn't had the id "next" to apply to the text "next" so if you change it from <div id="aboutme"> <h2>About Me</h2> </div> to <h2><div id="aboutme"> About Me </div></h2> now it will work
13th Apr 2018, 7:59 PM
Roel
Roel - avatar
0
it works, although i don't 100% understand it *edit* oh sorry, I haven't reloaded the question yet, so i didn't see your explaination
13th Apr 2018, 8:00 PM
Roel
Roel - avatar
0
wait, what do you want to see if you click it
13th Apr 2018, 8:04 PM
Roel
Roel - avatar