Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialNatalia Karolinskaya
9,367 PointsWhen I use prompt() for 3 questions, each dialog box pops up twice. Can anyone explain me why?
Prompt dialog box pops up twice
2 Answers
Sandrine Pfeuti
Courses Plus Student 7,441 PointsNot having seen your code but having a guess from my own experience.....
May I suggest to check your index.html code? At the end of the video, Dave instructs to make sure we link the .js file to the index.html file, which I duly did in the head
section under title
However, what I hadn't noticed is that in fact, a link to story.js was already under h1
, which resulted in running the program in the story.js file twice. Maybe this is what's happening for you too?
I hope it helps!
Natalia Karolinskaya
9,367 PointsThanks Sandrine! Tha't exactly what happened!
Jacob Moyle
6,150 PointsJacob Moyle
6,150 PointsHello Natalia,
Could you please provide the code you are working with?
Cheers, Jacob