florida
10-20-2003, 10:55 AM
How do you subtract something in JavaScript data?
I have a y coordinate (this.y) where I need to subtract 25 from the its value only in IE.
if (!netscape4)
{
layerHeader = '<div id=myView' + this.myText + ' style="background: ; width: ' + this.width + '; visibility: hidden; position: absolute; left: ' + this.x + '; top: ' + this.y + ';">';
}
else
{
layerHeader = '<layer id=myView' + this.ID +'visibility=hide left=' + this.x +' top =' + this.y + '>';
}
I tried this:
layerHeader = '<layer id=myView' + this.ID +' visibility=hide left=' + this.x +' top =' + this.y - 25 + '>';
And it doesnt work and gives a JavaScript error.
Please advise.
I have a y coordinate (this.y) where I need to subtract 25 from the its value only in IE.
if (!netscape4)
{
layerHeader = '<div id=myView' + this.myText + ' style="background: ; width: ' + this.width + '; visibility: hidden; position: absolute; left: ' + this.x + '; top: ' + this.y + ';">';
}
else
{
layerHeader = '<layer id=myView' + this.ID +'visibility=hide left=' + this.x +' top =' + this.y + '>';
}
I tried this:
layerHeader = '<layer id=myView' + this.ID +' visibility=hide left=' + this.x +' top =' + this.y - 25 + '>';
And it doesnt work and gives a JavaScript error.
Please advise.