+ 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
31 Answers
+ 2
Roel Yes. It's only about the next button. I just want it to go to the next bit of text.
+ 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.
+ 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.
+ 2
Roel Its okay. I'm just glad you're trying to help.
+ 2
I want to see the content for SQL, after that Xss, and Broken authentication.
+ 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...
+ 2
You want me to put it in that order?
+ 2
I wonder why... I'll give it a shot
+ 2
Roel You think it was just in the wrong order?
+ 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.
+ 2
Roel My phone
+ 2
Roel Perhaps I should try on PC.
+ 2
Roel You are right. It is working. I wonder why my phone can't do the same.
+ 2
Roel I'm with android too. Maybe I should reboot the app.
+ 2
Thanks, you're awesome.
0
is it only about your "next" button? because it also says that "button()" isn't defined
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
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
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
0
wait, what do you want to see if you click it