dschnell
02-21-2003, 09:29 PM
Hello,
I have a cookie which checks a count and needs to load a js file into the header if certain conditions are met, otherwise don't load the file.
I tried to use # include within the script but that sets an error.
Thanks In Advance!
Here is a partial example:
function checkCount() {
var count = GetCookie('tfe_count_js');
if (count == null) {
count=1;
SetCookie('tfe_count_js', count, exp);
// If the script makes it here I want to load an external js file into the HEAD of the page
<!--#include file="jscript/cookietest.js" -->
}
else {
count++;
SetCookie('tfe_count_js', count, exp);
}
}
I have a cookie which checks a count and needs to load a js file into the header if certain conditions are met, otherwise don't load the file.
I tried to use # include within the script but that sets an error.
Thanks In Advance!
Here is a partial example:
function checkCount() {
var count = GetCookie('tfe_count_js');
if (count == null) {
count=1;
SetCookie('tfe_count_js', count, exp);
// If the script makes it here I want to load an external js file into the HEAD of the page
<!--#include file="jscript/cookietest.js" -->
}
else {
count++;
SetCookie('tfe_count_js', count, exp);
}
}