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 trialjang walia
7,717 Pointshtml lagging behind
when i run my code ,the javascript alert and prompt appears on screen leaving sceen blank in the back. the background image is not shown while the javascript is running..?? i have built a simple quizz programme so that why i have added javascript .
kindly help
Ross King
20,704 PointsHi jang walia ,
Can you provide the code so other students can help you. eslam said is most likely correct and his answer should fix your problem.
Gari Merrifield
9,598 PointsThere's some info in this article, and some corrections in the comments : https://javascript.info/onload-ondomcontentloaded
And there is an interesting conversation on the topic here on the community as well : https://teamtreehouse.com/community/why-i-can-see-the-result-of-documentwrite-only-after-all-the-prompts-and-alert-messages-disappear
Hopefully some of that helps..
eslam said
Courses Plus Student 6,734 Pointseslam said
Courses Plus Student 6,734 PointsBecause probably you have your script tag inside the head so instead put your script tag before the ending on the body tag like so :