Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    May 2006
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Completely Stumped

    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.

  • #2
    New Coder
    Join Date
    May 2006
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Solved. FF requires 'px' appended to the value.

    Thank you me.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •