I want to press the next button but it should check if the conditions are met before answering the link. Note: Link two together | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

I want to press the next button but it should check if the conditions are met before answering the link. Note: Link two together

<a href="www.something.com"><button id="mail" onclick="next ()">Next</button></a> https://code.sololearn.com/W28UVIskH59M/?ref=app https://code.sololearn.com/Wm1vo24aCc8U/?ref=app

11th Sep 2020, 10:35 PM
Akinbola Emmanuel Oluwanifemi
Akinbola Emmanuel Oluwanifemi - avatar
3 Answers
+ 3
Put 'return next()' instead next() like <a href="url"> <button id="btn" onclick="return next()">Next</button> </a>
11th Sep 2020, 10:50 PM
Jayakrishna 🇮🇳
+ 1
Alright thanks. I have put it although after filling the form and clicking submit I want it to go to the library address.
11th Sep 2020, 11:39 PM
Akinbola Emmanuel Oluwanifemi
Akinbola Emmanuel Oluwanifemi - avatar
+ 1
No problem again. Thanks it worked. Thank you so much.
11th Sep 2020, 11:42 PM
Akinbola Emmanuel Oluwanifemi
Akinbola Emmanuel Oluwanifemi - avatar