JJC
Mar 13th 2008, 11:18 am
I want to add variables into a Javascript file, am I doing it the right way?
<script type="text/javascript">
<!--
var something1 = "whatever1";
var something2 = whatever2";
// -->
</script>
<script type="text/javascript" src="http://www.domain.com/file.js"></script>
Then do I call them inside the file with this method below?
document.write("something1")
document.write("something2")
+ Rep for someone that posts someting that works!
<script type="text/javascript">
<!--
var something1 = "whatever1";
var something2 = whatever2";
// -->
</script>
<script type="text/javascript" src="http://www.domain.com/file.js"></script>
Then do I call them inside the file with this method below?
document.write("something1")
document.write("something2")
+ Rep for someone that posts someting that works!