florida
11-07-2003, 06:44 AM
I have a Javascript pop up that works great but I have alot of repetitive parts such as:
this.ID + ', ' + ((j + 2)/2 - 1)
Here is how it looks:
dataOutput = ' onMouseOver = "enterItem (' + this.ID + ', ' + ((j + 2)/2 - 1) + ');" onMouseOut = "exitItem (' + this.ID + ', ' + ((j + 2)/2 - 1) + ');" ';
I tried to put it in a variable and call it but it wont work:
var dataVariable = (this.ID + ', ' + ((j + 2)/2 - 1));
dataOutput = ' onMouseOver = "enterItem (dataVariable);" onMouseOut = "exitItem (dataVariable);" ';
Anyway I can do this??
this.ID + ', ' + ((j + 2)/2 - 1)
Here is how it looks:
dataOutput = ' onMouseOver = "enterItem (' + this.ID + ', ' + ((j + 2)/2 - 1) + ');" onMouseOut = "exitItem (' + this.ID + ', ' + ((j + 2)/2 - 1) + ');" ';
I tried to put it in a variable and call it but it wont work:
var dataVariable = (this.ID + ', ' + ((j + 2)/2 - 1));
dataOutput = ' onMouseOver = "enterItem (dataVariable);" onMouseOut = "exitItem (dataVariable);" ';
Anyway I can do this??