Hi Everybody,
I'm having a bit of trouble explaining what I'm trying to do, so please bear with me.
I have a website with the following code:
<html>
<head>
<title>Frosh Galleries</title>
</head>
<body>
<script language="JavaScript1.2" src="</script>
<script language="JavaScript1.2">display();</script>
</body>
</html>
As you can see this is very basic.
Galleries.js looks like this:
function display(){
var currdate = new Date()
var day = currdate.getDay()
var date = currdate.getDate()
var month = currdate.getMonth()
var year = currdate.getYear()
month++
if (date < 10) {
date = ('0'+date);
}
if (month < 10) {
month = ('0'+month);
}
opendate= (date+''+month+''+year);
document.writeln (opendate);
}
Again, Very Simple.
What I would like to do is 'document.writeln' the following statements and have the statements execute.
<script language="JavaScript1.2" src="opendate">
</script>
<script language="JavaScript1.2">display();</script>
Note: opendate is a variable
I think I found this a while back in this forum, but I came up empty this time when I search. If you could point me in the right direction or offer any help that would be great.
Thanks in adavnce,
NoChoice
I'm having a bit of trouble explaining what I'm trying to do, so please bear with me.
I have a website with the following code:
<html>
<head>
<title>Frosh Galleries</title>
</head>
<body>
<script language="JavaScript1.2" src="</script>
<script language="JavaScript1.2">display();</script>
</body>
</html>
As you can see this is very basic.
Galleries.js looks like this:
function display(){
var currdate = new Date()
var day = currdate.getDay()
var date = currdate.getDate()
var month = currdate.getMonth()
var year = currdate.getYear()
month++
if (date < 10) {
date = ('0'+date);
}
if (month < 10) {
month = ('0'+month);
}
opendate= (date+''+month+''+year);
document.writeln (opendate);
}
Again, Very Simple.
What I would like to do is 'document.writeln' the following statements and have the statements execute.
<script language="JavaScript1.2" src="opendate">
</script>
<script language="JavaScript1.2">display();</script>
Note: opendate is a variable
I think I found this a while back in this forum, but I came up empty this time when I search. If you could point me in the right direction or offer any help that would be great.
Thanks in adavnce,
NoChoice