...

View Full Version : Completely Stumped



hymanroth
07-04-2006, 01:50 PM
Hi Guys, can someone please tell me why this doesn't work in FF:

HTML:
<img omousedown="foo(this)" src=.....>

JS:
function foo (item)
{
item.style.position='absolute';
item.style.top=200;
item.style.left=200;
}

This works ok in IE, but in FF I get: Error in parsing value for property 'top'.

I've tried setting top and left in css, so that FF has an attribute to work with - but this has no effect.

This thing is driving me mad, if anybody has any ideas, I'd be very grateful.

Thanks.

hymanroth
07-04-2006, 03:09 PM
Solved. FF requires 'px' appended to the value.

Thank you me.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum