+ 2
Custom popup JavaScript HTML error! Help
I'm actually trying to create a library of a lot of most used Functions One is popup(custom) It has errors can you help? https://code.sololearn.com/WrYpENS7cXnv/?ref=app
7 ответов
+ 3
Yes, it's exactly why I shared the feeds post link. If you have read it, you would've fixed the problem by now : )
Wrap parts of the code that interacts with DOM inside a "load" event handler function of `window` object.
window.onload = () =>
{
popup("green","","Hi","Demo","","",100,100);
};
The JS script is loaded before the DOM was completely loaded, Adding or modifying element(s) when DOM isn't ready was the reason for the error.
For more details on that, please read the link in my previous reply.
+ 2
Function popup() was never invoked.
I don't see anything on page, but neither did I see any error message. What error did you see?
+ 2
Try code
+ 2
Thanks I read it but didn't understand that and ignored it you may add examples about 3 - 5
+ 1
I saw about Id things and stuff errors like not defined
+ 1
Too few detail to conclude anything.
Read through this to see whether it is related to your problem, and whether the suggestion works fot you.
https://www.sololearn.com/post/90825/?ref=app
0
What was that 3 - 5 again?