Jump to content

else if and document.write and script


Patriot

Recommended Posts

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...