Design comparison
Solution retrospective
This is my first challenge with js.
i tried 2 page on a html with javascript without display:hidden
. İt worked but i have a problem with when i revisited first page after push 'RATE AGAIN' button. Problem is when i visit first time everythink working perfectly but second time visit doesn't vork javascript files.
How can resolve this problem. may someone help me about that?🤔
Also, feel free to express your positive or negative opinions. Your opinion is important to my development.
ty🙂
Community feedback
- @EileenpkPosted almost 2 years ago
Hi Ahmet, your project looks great.
I sent you a merge request on GitHub with the bug fixed.
Here is what I did to fix the problem;
- Moved the
rateAgain
function into scripts.js - In
rateAgain
, deleted all the.innerHTML
and uncommented thelocation.reload(),
that you already had in the code. - Deleted the thanks.js
Let me know if you were looking for a different solution to this problem.
Hope you found this helpful!
- Let's connect on LinkedIn! - @Eileenpk
Marked as helpful0 - Moved the
- @ahmetkabacaliPosted almost 2 years ago
Hi Eileen;
First of all, thank you very much for taking the time to deal with my problem.😇
Yes I resolved the problem with
location.reload()
too. But then i noticed that it refreshed the page completely. It could be used for this project, but if I have this problem in larger projects in the future, I want to learn how to resolve the problem without refreshing.is there any other solution? Or should I back up everything to localstorage before the script?
Ty🙂
0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord