tZ
12-06-2006, 06:04 AM
I have no idea why this isn't working but, maybe someone can help me out.
All I want to do is pass 4 arguments to another function and for some reason its not working.
This is a very simplified version of what I need to do.
window.onload = function() {
tx.init(node.paragraph[1],[0,191,255],[70,70,70],notpassing);
}
for some reason notpassing is not passing to the next function is coming up undefined. I have allready checked to see if it is defined with a alert before its passed and it alerts as its suppose to. However, when I pass it and alert I get a undefined variable. This is what I'm passing this to:
var tr = {
init: function(element,inital,last,notworking) {
var node = element;
alert(notworking);
node.color1 = inital;
node.color2 = last;
tr.transform_color(node);
}
};
So when I alert notworking it comes up undefined and I have no clue why. For some reason it won't read the fourth argument ever.
Is it the way I'm passing the array or something? It works perfectly as it but, allways passes the fourth argument as undefined- what gives?
any help would be most appreciated.
All I want to do is pass 4 arguments to another function and for some reason its not working.
This is a very simplified version of what I need to do.
window.onload = function() {
tx.init(node.paragraph[1],[0,191,255],[70,70,70],notpassing);
}
for some reason notpassing is not passing to the next function is coming up undefined. I have allready checked to see if it is defined with a alert before its passed and it alerts as its suppose to. However, when I pass it and alert I get a undefined variable. This is what I'm passing this to:
var tr = {
init: function(element,inital,last,notworking) {
var node = element;
alert(notworking);
node.color1 = inital;
node.color2 = last;
tr.transform_color(node);
}
};
So when I alert notworking it comes up undefined and I have no clue why. For some reason it won't read the fourth argument ever.
Is it the way I'm passing the array or something? It works perfectly as it but, allways passes the fourth argument as undefined- what gives?
any help would be most appreciated.