Patriot Posted December 25, 2005 Share Posted December 25, 2005 i am trying to call an external js from a document.write, for example var monName = new Array ("January","February","March","April","May","June","July","August","September","October","November","December");var now = new Date;if(now.getDate() == 25 && monName[now.getMonth()] == "December"){document.write ("i would like an external js here");}else if(now.getDate() == 1 && monName[now.getMonth()] == "January"){document.write ("i would like an external js here");}else{document.write("i would like an external js here");}</script> im sure there is a way to do this i just havent figured it out yet, if anybody knows how to do this i would really appreciate it alot. Link to comment Share on other sites More sharing options...
Chocolate570 Posted December 25, 2005 Share Posted December 25, 2005 document.write('<script src="src.js" type="text/javascript">')That would work. Link to comment Share on other sites More sharing options...
Patriot Posted December 28, 2005 Author Share Posted December 28, 2005 man i had it almost exactly like that except backwards and missing a little peice.works great now thanks for the quick reply, i knew i had to be close Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now