I opened a javaScript file in a javaScript time….
document.write("<script src='newnote.js' type='text/javascript'></script>");
is there an other way to load the js in js code..?
(this file is for loading a popup menu js code , which is loaded after delay by clock js code … so i want an othe way to loaded it)
Is it possible that the script that you are adding to the page (in this case
newnote.js) is causing the error you are experiencing?Instead of the line you used starting with
document.writeuse this instead:If you still get your quotes error, then the code inside of
newnote.jsis messed up.Don’t think this was really what you were asking, but if you used the code I listed above you could then remove this file from your page by calling this:
One more thought:
If your path to
newnote.jsis not correct (because it is not in the same directory as the calling page) then the server would return a404error page instead of the file. If your browser tried to execute it like javascript, it could throw an error. Try supplying the full URL:http://yoursite.com/js/newnote.jsor a root relative one:/js/newnote.js