+ 1

JS script is ignored by browser

Hello everyone, I have a big problem in web languages, I'm writing the code with html and JS, but the browser ignores totally the scripts located in body section (the head ones works correctly), I'm pretty sure to have put html tags in the right way. I haven't any idea of what it can be, let me know if I have to post the code too to have an answer (now it's on another device).

2nd Jul 2020, 12:34 PM
Lorenzo Parisi
Lorenzo Parisi - avatar
8 Answers
+ 7
Lorenzo Parisi that is because you don't use comma(,) in for loop. use semicolon to separate them for(i=0;i<tot.length;i++){ document.write(tot[i]+"<br/>"); }
2nd Jul 2020, 1:22 PM
Raj Chhatrala
Raj Chhatrala - avatar
+ 6
Uh, maybe you have JavaScript disabled from your browser.
2nd Jul 2020, 12:57 PM
Raj Chhatrala
Raj Chhatrala - avatar
+ 6
please show us your code
2nd Jul 2020, 1:36 PM
Galaxy-Coding (inactive)
Galaxy-Coding (inactive) - avatar
+ 2
EmmanueLZ. In fact that's weird, a mistake at the end of a script cause an error that make all the code between script tags ignoredđŸ€”đŸ€”
2nd Jul 2020, 1:39 PM
Lorenzo Parisi
Lorenzo Parisi - avatar
+ 1
Lorenzo Parisi hi, yes it would be better with the code or at least to tell if some error messages are return from the console and which they are.
2nd Jul 2020, 12:45 PM
EmmanueLZ.
EmmanueLZ. - avatar
+ 1
This is the code, the WebStorm debug says that the FOR cycle cannot complete without throwing an exception, while Code playground says that the ")" in the for cycle is not expected https://code.sololearn.com/W2yFBGQ1P2t7/?ref=app
2nd Jul 2020, 1:19 PM
Lorenzo Parisi
Lorenzo Parisi - avatar
+ 1
đŸ”« Rick Grimes ops I made a silly error😅, I have to exercise a lot, thank you
2nd Jul 2020, 1:31 PM
Lorenzo Parisi
Lorenzo Parisi - avatar
+ 1
Also, shouldn't your var tot be an array ? var tot=[x,y,,z,w,h,g] But before getting to that lines you should have at least your alert ("benvenutto") working. So I don't know.
2nd Jul 2020, 1:31 PM
EmmanueLZ.
EmmanueLZ. - avatar