cesarcesar
Programmer
- Mar 5, 2003
- 30
hello all,
this is the important part of my script:
-----------------------------------------
function matrix(){
var date = 4;
if(date == 4){
var f = 'idf_loader.htm';
var m = 'webcast';
document.write('<a href="javascript:launchCenter(f,m);"></a>');
}else{
bla bla
}
}
my problem is that the computer says that the variable "f" in (f,m) is not defined. when i give it a value like '1' ('1',m) it then says variable "m" is not defined. why is this? does it have to do with any of these factors below?
1. the function launchCenter is not in the same JS script as the above function matrix. but both pages holding scripts are called in the <head> of HTML page.
2. or if because it has anything to do with it being a function within a function that calls to an outside function? not sure
Thanks for any reply's.
cesar
this is the important part of my script:
-----------------------------------------
function matrix(){
var date = 4;
if(date == 4){
var f = 'idf_loader.htm';
var m = 'webcast';
document.write('<a href="javascript:launchCenter(f,m);"></a>');
}else{
bla bla
}
}
my problem is that the computer says that the variable "f" in (f,m) is not defined. when i give it a value like '1' ('1',m) it then says variable "m" is not defined. why is this? does it have to do with any of these factors below?
1. the function launchCenter is not in the same JS script as the above function matrix. but both pages holding scripts are called in the <head> of HTML page.
2. or if because it has anything to do with it being a function within a function that calls to an outside function? not sure
Thanks for any reply's.
cesar