J
John B.
In an effort to turn a little more a module with my pages, I would
like to turn my internal javascripts into an external javascript files
to supply the information onto a web page.
I still getting the hang of javascript, and I've searched the web, but
I'm either putting the wrong key words into the search engines, or
it can't be done. I've also done a quick search here, but some of
the answers about external javascript examples seem to deal with
issues of displaying CSS.
Here's an example page that contains a javascript that I would like
to turn into an external file:
=========================================
<HTML><HEAD><TITLE>Title of your page</TITLE>
<script language="JavaScript"><!--
function dateString(oneDate) {
var theYear = oneDate.getFullYear()
return theYear
}//--></script>
</HEAD><BODY>
<p>This is the year:
<script language="JavaScript" type="text/JavaScript"
</p>
</BODY></HTML>
=========================================
If I can see how the simple example above is turned into an
external file and accessed from within the page, then I should
be able to figure out how to do my other scripts.
Thanks for any insight.
like to turn my internal javascripts into an external javascript files
to supply the information onto a web page.
I still getting the hang of javascript, and I've searched the web, but
I'm either putting the wrong key words into the search engines, or
it can't be done. I've also done a quick search here, but some of
the answers about external javascript examples seem to deal with
issues of displaying CSS.
Here's an example page that contains a javascript that I would like
to turn into an external file:
=========================================
<HTML><HEAD><TITLE>Title of your page</TITLE>
<script language="JavaScript"><!--
function dateString(oneDate) {
var theYear = oneDate.getFullYear()
return theYear
}//--></script>
</HEAD><BODY>
<p>This is the year:
<script language="JavaScript" type="text/JavaScript"
document.write(dateString(new Date()))</script>
</p>
</BODY></HTML>
=========================================
If I can see how the simple example above is turned into an
external file and accessed from within the page, then I should
be able to figure out how to do my other scripts.
Thanks for any insight.